Skip to content

Instantly share code, notes, and snippets.

@chrisguitarguy
Last active September 14, 2017 19:00
Show Gist options
  • Save chrisguitarguy/497301c60409cc70ee8589298a7f232b to your computer and use it in GitHub Desktop.
Save chrisguitarguy/497301c60409cc70ee8589298a7f232b to your computer and use it in GitHub Desktop.
FROM ubuntu:16.04
RUN apt-get update -y && apt-get -y install openssh-client
version: '3'
services:
server:
build:
context: .
dockerfile: server.dock
client:
build:
context: .
dockerfile: client.dock
command: "/bin/bash -c 'while :; do sleep 1000; done'"
docker-compose up -d
docker-compose exec client ssh sshuser@server
FROM nodered/node-red-docker:latest
USER root
RUN apt-get update -y \
&& apt-get -y install openssh-server \
&& adduser --disabled-password --gecos '' sshuser \
&& echo sshuser:password | chpasswd \
&& mkdir /var/run/sshd
EXPOSE 22
CMD ["/bin/sh", "-c", "/usr/sbin/sshd && npm start -- --userDir /data"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment