dockerfile 예제 및 주석

1735 단어 기타docker

############################################################ # Dockerfile to build Nginx Installed Containers # Based on Ubuntu ############################################################ # Set the base image to Ubuntu FROM ubuntu # File Author / Maintainer MAINTAINER Maintaner Name # Install Nginx
4# Add application repository URL to the default sources
기본 소스에 응용 프로그램 라이브러리 URL 추가RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list # Update the repository
#  
RUN apt-get update # Install necessary tools
#  
RUN apt-get install -y nano wget dialog net-tools # Download and Install Nginx
# Nginx 
RUN apt-get install -y nginx # Remove the default Nginx configuration file
# nginx  
RUN rm -v /etc/nginx/nginx.conf # Copy a configuration file from the current directory
#  
ADD nginx.conf /etc/nginx/ # Append "daemon off;" to the beginning of the configuration
RUN echo "daemon off;" >> /etc/nginx/nginx.conf # Expose ports
#  
EXPOSE 80 # Set the default command to execute
#  
# when creating a new container
#  
CMD service nginx start

좋은 웹페이지 즐겨찾기