Skip to content

Commit

Permalink
Dockerfile for goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
everesio committed Feb 26, 2024
1 parent fe62512 commit 439a076
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 31 deletions.
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
FROM golang:1.22-alpine3.19 AS builder
# hadolint ignore=DL3018
RUN apk add --no-cache alpine-sdk ca-certificates curl

WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN make vendor build

FROM alpine:3.19

COPY --from=builder /app/reverse-http /reverse-http

RUN apk add ca-certificates
COPY reverse-http /
USER 65532:65532
ENTRYPOINT ["/reverse-http"]
14 changes: 14 additions & 0 deletions Dockerfile.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM golang:1.22-alpine3.19 AS builder
# hadolint ignore=DL3018
RUN apk add --no-cache alpine-sdk ca-certificates curl

WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN make vendor build

FROM alpine:3.19
COPY --from=builder /app/reverse-http /reverse-http
USER 65532:65532
ENTRYPOINT ["/reverse-http"]
12 changes: 6 additions & 6 deletions docker-compose.ha-tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
hostname: proxy-1
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -41,7 +41,7 @@ services:
hostname: proxy-2
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -64,7 +64,7 @@ services:
hostname: agent-4711
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
Expand All @@ -78,7 +78,7 @@ services:
hostname: agent-4712
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
Expand All @@ -92,7 +92,7 @@ services:
hostname: lb-1
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
Expand All @@ -109,7 +109,7 @@ services:
hostname: lb-2
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.ha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
hostname: proxy-1
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -38,7 +38,7 @@ services:
hostname: proxy-2
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -58,7 +58,7 @@ services:
hostname: agent-4711
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
Expand All @@ -72,7 +72,7 @@ services:
hostname: agent-4712
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy-lb:4242'
Expand All @@ -86,7 +86,7 @@ services:
hostname: lb-1
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
Expand All @@ -99,7 +99,7 @@ services:
hostname: lb-2
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- lb
- '--http-proxy.listen-address=:3128'
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.jwt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
hostname: proxy
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -23,7 +23,7 @@ services:
hostname: agent-4711
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy:4242'
Expand All @@ -37,7 +37,7 @@ services:
hostname: agent-4712
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy:4242'
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.noauth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
hostname: proxy
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- proxy
- '--agent-server.listen-address=:4242'
Expand All @@ -22,7 +22,7 @@ services:
hostname: agent-4711
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy:4242'
Expand All @@ -34,7 +34,7 @@ services:
hostname: agent-4712
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.develop
command:
- agent
- '--agent-client.server-address=proxy:4242'
Expand Down

0 comments on commit 439a076

Please sign in to comment.