Skip to content

Instantly share code, notes, and snippets.

@chrisguitarguy

chrisguitarguy/client.dock

Last active Sep 14, 2017
Embed
What would you like to do?
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