Dockerfile
excerpted from Docker Up and Running
# Base layer to start the image build with
FROM node:0.10
# populates `Author` field in image's metadata
MAINTAINER Anna Doe <anna@example.com>
# populates `Config`/`Labels` fields
LABEL "rating"="Five Stars" "class"="First Class"
# By default, processes within container run as root
# recommended to switch to non-privileged user in production
USER root
ENV AP /data/app
ENV SCPATH /etc/supervisor/conf.d
RUN apt-get -y update
# the daemons
RUN apt-get -y install supervisor
RUN mkdir -p /var/log/supervisor
# Supervisor Configuration
# copy files from local filesystem into image
ADD ./supevisor/conf.d/* $SCPATH/
# Application Code
ADD *.js* $AP/
# change working directory in image to for the remaining build unless changed again.
WORKDIR $AP
RUN npm install
# command line that runs in image
CMD ["supervisord", "-n"]
'프로그래밍 툴 > Docker' 카테고리의 다른 글
ngrok로 로컬호스트 외부에서 접속하기 (0) | 2020.07.23 |
---|---|
Docker(도커)-images (0) | 2020.07.20 |
Docker (도커)- basics (0) | 2020.07.20 |