Hi, I am a beginner for docker and want to create a environment container for apache (httpd) .
I am using subsytem Ubuntu of win10 system.
I have pull a pure centos image in my docker server.
docker images
will show my centos:latest
image
The steps of mine:
-
- create a direcotry “build” and into it.
-
- create a file named “Dockerfile” and put the content down blow:
FROM centos:latest #(`docker images` will show my `centos:latest` image)
RUN yum -y install httpd #(just want to install a httpd software)
RUN systemctl enable httpd.service
EXPOSE 80
- run command :
docker build -t centos:httpd .
Hope get the solution here, thank you.