Author : CarbonSphere
Email : [email protected]
Pull required container
docker pull carbonsphere/docker-mysql-phpmyadmin
docker pull carbonsphere/docker-centos6-symfony
Start DB container "docker run -d --name db carbonsphere/docker-mysql-phpmyadmin"
Start Symfony container "docker run -d -p 8080:80 -p 222:22 --name web --link db:db carbonsphere/docker-centos6-symfony"
Initialize DB from symfony to linked DB #use "docker ps" to find your {container id} docker exec -it {container id} bash #once entered into container shell run the following command to initialize DB #Note: This only needs to be done once. sh /root/createUserDb.sh
Note: If you would like to build your own container image.
git clone https://github.com/carbonsphere/Docker-Mysql-PHPMyAdmin.git cd Docker-Mysql-PHPMyAdmin docker build -t carbonsphere/docker-mysql-phpmyadmin .
git clone https://github.com/carbonsphere/Docker-CentOS6-Symfony.git cd Docker-CentOS6-Symfony docker build -t carbonsphere/docker-centos6-symfony
ENV SYMFONYPROJECTNAME myProject
ENV CARBON_MYSQL_DB_HOST db
ENV CARBON_MYSQL_DB_PORT 3306
ENV CARBON_APP_NAME symfonydb
ENV CARBON_MYSQL_DB_USERNAME symfonyusr
ENV CARBON_MYSQL_DB_PASSWORD symfonypas
ENV CARBON_MAILER_TRANS smtp
ENV CARBON_MAILER_HOST 127.0.0.1
ENV CARBON_MAILER_USER null
ENV CARBON_MAILER_PASS null
ENV CARBON_SECRET DEFAULT_SECRET
These environment variables are used instead of what is in parameters.yml
DEFAULT_SECRET and RSA SSH Private Keys are randomly generated during image built time.
Highly recommend changing your private keys using /root/changesshkey.sh
Change your secret token by "CARBON_SECRET=cat /dev/urandom | tr -cd 'a-f0-9' | head -c 40"
You can change these environment variables by using docker run -e CARBON_MYSQL_DB_HOST=db01 -d -P --link db:db01 carbonsphere/docker-centos6-symfony
Git push will execute the following instructions
Content type
Image
Digest
sha256:3960a4be4…
Size
184.6 MB
Last updated
almost 11 years ago
docker pull carbonsphere/docker-centos6-symfony