123456789101112131415161718 |
- FROM alpine:3.8
- RUN apk add --no-cache openssh-client
- COPY entrypoint.sh /
- RUN chmod a+rx /entrypoint.sh
- ENTRYPOINT ["/entrypoint.sh"]
- COPY ssh_config /etc/ssh/ssh_config
- RUN chmod a=r /etc/ssh/ssh_config
- RUN adduser -S tunnel
- COPY --chown=tunnel:nogroup known_hosts /home/tunnel/.ssh/known_hosts
- USER tunnel
- ENV BIND_ADDRESS bind-address
- ENV BIND_PORT 22
- CMD ssh -T -R $BIND_ADDRESS:$BIND_PORT:$DOCKER_HOST_ADDRESS:22 serveo.net
|