Criando imagem a partir de Dockerfile

From Basef
Revision as of 09:29, 30 June 2017 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Para criar uma nova imagem do Docker a partir de um Dockerfile:

docker build -t nome/da/no/imagem /path/para/ofolder/que/esta/o/Dockerfile

Exemplo de arquivo Dockerfile:

FROM ubuntu
 
RUN apt-get update && apt-get install -y apache2
 
EXPOSE 80
 
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]