Sunday, 26 January 2020

Minimal Yet Complete Dockerfile

1) Create a project directory
2) Create file 'build.sh' with commands to build Docker image
3) Create file 'start.sh' with commands to exec after image build

Note:
ravik694/c7-systemd-sshd is a good base Docker image to start from. It comes with systemd, sshd.

Dockerfile:
FROM ravik694/c7-systemd-sshd
COPY . /project
RUN  cd /project && bash build.sh
CMD  cd /project && bash start.sh

No comments:

Post a Comment