Building an Docker Image

Aus Xinux Wiki
Version vom 8. Oktober 2019, 13:04 Uhr von Thomas.will (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „=Workdir= *cd /root/apache =Dockerfile= *cat Dockerfile <pre> #Baseimage ubuntu 18:04 FROM ubuntu:18.04 #we are the maintainer MAINTAINER technik@xinux.de #on…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Workdir

  • cd /root/apache

Dockerfile

  • cat Dockerfile
#Baseimage ubuntu 18:04
FROM ubuntu:18.04
#we are the maintainer 
MAINTAINER technik@xinux.de
#only run at built
RUN  apt-get update && apt-get install -y apache2  && apt-get clean
RUN  cp -ar /etc/apache2 /tmp
RUN  cp -ar /var/www/html /tmp
COPY start.sh /
#exposed ports
EXPOSE 80
EXPOSE 443
#command that execute in the container 
CMD ["bash", "/start.sh"]