Skip to content

Instantly share code, notes, and snippets.

@kimsible
Created July 28, 2015 16:14
Show Gist options
  • Save kimsible/1454d5fe5a49973535ff to your computer and use it in GitHub Desktop.
Save kimsible/1454d5fe5a49973535ff to your computer and use it in GitHub Desktop.
Docker-compose-sample
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
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