# use Alpine Linux as the base of our image FROM alpine RUN \ apk update &&\ # install apache web server apk add apache2 curl &&\ # a configuration file Apache needs echo ServerName my-web-server >/etc/apache2/conf.d/localhost.conf # add a file to the image for our webserver to serve ADD hello.txt /var/www/localhost/htdocs/hello.txt # run web-server plus shell when container started ENTRYPOINT \ /usr/sbin/httpd &&\ ash &&\ killall httpd