-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 633 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker/dockerfile:1
FROM golang:1.21
# Set destination for COPY
WORKDIR /app
# Download Go modules
COPY go.mod go.sum ./
RUN go mod download
# Copy the source code. Note the slash at the end, as explained in
# https://docs.docker.com/engine/reference/builder/#copy
COPY *.go ./
# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o /tlsproxy
# Expose (accept client connections)
EXPOSE 443
EXPOSE 8000
ENV TLSPROXY_TARGET "localhost"
ENV TLSPROXY_PORTS "443:80,8000"
ENV TLSPROXY_CERT_FILE "certificates/server.crt"
ENV TLSPROXY_KEY_FILE "certificates/server.key"
VOLUME "/certificates"
# Run
WORKDIR /
CMD ["/tlsproxy"]