mirror of
https://github.com/RipleyBooya/ssh-tunnel.git
synced 2025-12-13 00:18:37 +01:00
Create Dockerfile.tailscale
This commit is contained in:
parent
7ddda2b10e
commit
464fbcfb77
1 changed files with 28 additions and 0 deletions
28
docker/Dockerfile.tailscale
Normal file
28
docker/Dockerfile.tailscale
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Use Alpine Linux
|
||||
FROM alpine:latest
|
||||
|
||||
# Install required packages, including `gettext` for `envsubst`
|
||||
RUN apk add --no-cache openssh-client autossh bash logrotate gettext iptables ip6tables tailscale
|
||||
|
||||
# Define required environment variables
|
||||
ENV SSH_HOST=""
|
||||
ENV SSH_USER=""
|
||||
ENV REMOTE_PORTS=""
|
||||
ENV LOCAL_PORTS=""
|
||||
ENV TAILSCALE_AUTH_KEY=""
|
||||
ENV LOGROTATE_FREQUENCY="daily"
|
||||
ENV LOGROTATE_ROTATE="7"
|
||||
ENV LOGROTATE_COMPRESS="compress"
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
|
||||
RUN mkdir -p /var/log/ssh-tunnel && chmod 777 /var/log/ssh-tunnel
|
||||
RUN mkdir -p /var/lib/tailscale
|
||||
|
||||
# Copy scripts and logrotate configuration
|
||||
COPY entrypoint.tailscale.sh /entrypoint.sh
|
||||
COPY logrotate.template /logrotate.template
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
# Run the entrypoint script
|
||||
CMD ["/entrypoint.sh"]
|
||||
Loading…
Add table
Reference in a new issue