There are two options to build and run docker from the command line
- Using docker-compose
- Using docker run
The following environment variables need to be set in the docker-compose file or in your profile. They can also be passed in when executing docker-compose up. They are all using default values via the .env file.
- repository
- hash_salt
- database
- username
- password
- host
- port
- namespace
- driver
*Not all environment variables have to be set but pass in as many as possible
- Run repository=githublink hash_salt=value database=value username=value password=value host=value port=value namespace=value driver=value docker-compose up
- Set above environment variables in your profile or set them in the docker-compose.yml file
- Run docker-compose up
- Run docker-compose down
- Run docker build -t cbiit/drupal .
- Change .env file to reflect real values
- Run docker run --env-file=.env -p 8080:80 --name drupal-server cbiit/drupal
- Run docker run -e repository=githublink hash_salt=value -e database=value -e username=value -e password=value -e host=value -e port=value -e namespace=value -e driver=value -p 8080:80 --name drupal-server cbiit/drupal
- Run docker stop drupal-server
- Run docker rm drupal-server
- Make sure all containers are stopped and removed referencing image
- Run docker rmi cbiit/drupal