Skip to content

Commit 0f16077

Browse files
committed
use a separate Dockerfile for publishing to Dockerhub
1 parent f3a6f67 commit 0f16077

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

Dockerfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
FROM golang:latest
2-
WORKDIR /app
3-
COPY go.mod go.sum ./
4-
RUN go mod download
5-
COPY main.go .
6-
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o github-action-to-otlp .
1+
FROM codeboten/github-action-to-otlp:v1
72

8-
FROM alpine:latest
9-
RUN apk --no-cache add ca-certificates
10-
WORKDIR /root/
11-
COPY --from=0 /app/github-action-to-otlp .
123
ENTRYPOINT ["/root/github-action-to-otlp"]

Dockerfile.build

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM golang:latest
2+
WORKDIR /app
3+
COPY go.mod go.sum ./
4+
RUN go mod download
5+
COPY main.go .
6+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o github-action-to-otlp .
7+
8+
FROM alpine:latest
9+
RUN apk --no-cache add ca-certificates
10+
WORKDIR /root/
11+
COPY --from=0 /app/github-action-to-otlp .
12+
ENTRYPOINT ["/root/github-action-to-otlp"]

0 commit comments

Comments
 (0)