Created
July 28, 2015 16:14
-
-
Save kimsible/1454d5fe5a49973535ff to your computer and use it in GitHub Desktop.
Docker-compose-sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node: | |
build: ./ | |
environment: | |
- HOSTNAME=localhost | |
ports: | |
- "8080:80" # http | |
- "8043:443" # https | |
- "8022:22" # ssh | |
volumes: # path of your work directory | |
- /__WORK_DIRECTORY__/:/home/node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:latest | |
RUN apt-get update | |
RUN apt-get install -y openssh-server vim | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:root' | chpasswd | |
RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment