Dockerfile 작성 예제

Jan 25, 2018

Dockerfile 작성할 때 참고용

FROM centos:7
RUN yum install -y make libtool pkgconfig autoconf python-sphinx wget bzip2 bind-utils
EXPOSE 53
COPY knot.conf /work
WORKDIR /work
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python", "-u", "/work/app.py"]

Run

docker run -it --rm \
  -p 3307:3306 \
  -v /nfs/rt-knot-service/mysql/entrypoint.sh:/entrypoint.sh \
  -e MYSQL_ROOT_PASSWORD=passwd \
  my-docker-image:v1 \
  /bin/bash