Config for my personal servers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
875 B

FROM alpine:latest as builder
COPY . ./
# This is where one could build the application code as well.
FROM alpine:latest as tailscale
COPY . ./
ENV TSFILE=tailscale_1.24.2_amd64.tgz
RUN wget${TSFILE} && tar xzf ${TSFILE} --strip-components=1
COPY . ./
FROM alpine:latest
RUN apk update && apk add --no-cache ca-certificates iptables ip6tables nginx
# Copy binary to production image
COPY --from=builder /app/ /app/
COPY --from=tailscale /app/tailscaled /app/tailscaled
COPY --from=tailscale /app/tailscale /app/tailscale
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale
COPY nginx.conf /etc/nginx/http.d/nginx.conf
# Run on container startup.
CMD ["/app/"]