Dockerfile 442 B

123456789101112131415161718
  1. FROM arm32v6/alpine:3.8
  2. RUN apk add --no-cache openssh-client
  3. COPY entrypoint.sh /
  4. RUN chmod a+rx /entrypoint.sh
  5. ENTRYPOINT ["/entrypoint.sh"]
  6. COPY ssh_config /etc/ssh/ssh_config
  7. RUN chmod a=r /etc/ssh/ssh_config
  8. RUN adduser -S tunnel
  9. COPY known_hosts /home/tunnel/.ssh/known_hosts
  10. RUN chown tunnel /home/tunnel/.ssh/known_hosts
  11. USER tunnel
  12. ENV BIND_ADDRESS bind-address
  13. CMD ssh -T -R $BIND_ADDRESS:22:$DOCKER_HOST_ADDRESS:22 serveo.net