DevOps virtualization
You should use docker/docker-compose to accomplish the following tasks.
The first image Web
has some customizations that will necessitate you building a new image.
Web image:
apt update
, then install tzdata
.apache2
, php
, php-mysql
, libapache2-mod-php
Remember that the database name MUST be pokemondb
You can use an existing mysql image without any customization.
DB image:
mysql:5.7
.MYSQL_DATABASE
, MYSQL_USER
, MYSQL_PASSWORD
and MYSQL_RANDOM_ROOT_PASSWORD
. See the documentation here for examples. (These can be set in the docker-compose file)Make sure that you can access port 80 of the apache image and visit /water/install.php
of the downloaded pokemon files to install the tables and see if the app works. After it works, you can just visit the base url of your app.
DB_HOST=joesmysqlserver
. (You cannot have any spaces around the equal sign.RUN wget http://whateverfile.tgz && tar -xvzf whteverfile.tgz -C /var/www/html && rm *.tgz
(I am not sure if it is the -C option for tar that puts it in a location or not)Demo it to me.