Merge e31beb7d3deee3856b8e18099b6766f1e005f5a4 into 25689a88ed28c5e2a455b41720a9d46669681892

This commit is contained in:
Matej Cotman 2017-06-05 22:38:05 +00:00 committed by GitHub
commit 5f311623b1

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM golang:1.7-alpine
RUN apk add --no-cache openssh git
RUN adduser -S ssh-chat
WORKDIR /home/ssh-chat
ENV HOME /home/ssh-chat
RUN go get -v github.com/shazow/ssh-chat
RUN go build github.com/shazow/ssh-chat/cmd/ssh-chat
RUN mv ./ssh-chat /usr/bin/ssh-chat && \
echo -e '#!/bin/sh\nif [[ ! -e ~/.ssh/id_rsa ]]; then ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa; fi; /usr/bin/ssh-chat $@' > /usr/bin/ssh-chat-run && \
chmod +x /usr/bin/ssh-chat-run
USER ssh-chat
ENTRYPOINT ["/usr/bin/ssh-chat-run"]
CMD ["--verbose --bind :5000 --identity ~/.ssh/id_rsa"]