mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Update Dockerfile to build properly
Credit goes to iamcgn at https://www.reddit.com/r/docker/comments/mh35w3/architecture_issue_with_running_a_docker_project/ for creating this Dockerfile.
This commit is contained in:
@@ -10,12 +10,12 @@ RUN go mod download
|
||||
COPY . .
|
||||
|
||||
RUN rice embed-go
|
||||
RUN CGO_ENABLED=0 go build -o boringproxy
|
||||
RUN chmod +x boringproxy
|
||||
FROM scratch
|
||||
RUN cd cmd/boringproxy && CGO_ENABLED=0 go build -o boringproxy
|
||||
|
||||
FROM scratch
|
||||
EXPOSE 80 443
|
||||
|
||||
COPY --from=builder /build/boringproxy /
|
||||
COPY --from=builder /build/cmd/boringproxy/boringproxy /
|
||||
|
||||
ENTRYPOINT ["/boringproxy"]
|
||||
CMD ["server"]
|
||||
|
||||
Reference in New Issue
Block a user