close

[實作影片]

[測試環境數據]

作業系統 ubuntu
版本 17.04
測試範圍 使用docker安裝drupal

[指令碼]


(1)、
sudo usermod -aG docker $(whoami)


(1)、
logout


(2)、
sudo apt-get -y install python-pip

(3)、
sudo pip install docker-compose


(4)、
mkdir dp


(5)、
cd dp


(6)、
nano stack.yml

(7)、
F3
ENTER
F2

(7)、
# Drupal with PostgreSQL
#
# Access via "http://localhost:8080"
#   (or "http://$(docker-machine ip):8080" if using docker-machine)
#
# During initial Drupal setup,
# Database type: PostgreSQL
# Database name: postgres
# Database username: postgres
# Database password: example
# ADVANCED OPTIONS; Database host: postgres

version: '3.1'

services:

  drupal:
    image: drupal:8.2-apache
    ports:
      - 8080:80
    volumes:
      - /var/www/html/modules
      - /var/www/html/profiles
      - /var/www/html/themes
      # this takes advantage of the feature in Docker that a new anonymous
      # volume (which is what we're creating here) will be initialized with the
      # existing content of the image at the same location
      - /var/www/html/sites


  postgres:
    image: postgres:9.6
    environment:
      POSTGRES_PASSWORD: example

(8)、
docker-compose -f stack.yml up


(9)、
http://localhost:8080


參考資料來源:
https://store.docker.com/images/drupal

 

 

 

arrow
arrow
    文章標籤
    ubuntu_17.04 docker
    全站熱搜

    米拉尤咕 發表在 痞客邦 留言(0) 人氣()