Task
1. Write a Docker file to create a Docker image which should have WordPress installed
FROM wordpress:latest
LABEL name="mywordpress"
LABEL maintainer="evans"
RUN echo wordpress
#If FROM centos then RUN yum update && yum install -y wordpress
#WORKDIR /root
#WORKDIR /test
#ADD and COPY
#COPY test.sh /root/test
EXPOSE 80
EXPOSE 443
#CMD bash /root/test/test.sh
echo Hello,Docker.WordPress.#build
docker build -t evansastre/evans:wordpress .2. Write a Docker file to create a Docker image for database Now, use Docker compose to bring up the above Docker images as containers. Database container should mount the local host's “/etc/mysql” volume into it's (containers) /etc/mysql directory.
Last updated