Skip to content

Commit 69f5af5

Browse files
committed
Update Build
1 parent a8e40d9 commit 69f5af5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/docker.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ jobs:
2525
type=ref,event=tag
2626
type=sha
2727
- name: Set up QEMU
28-
uses: docker/setup-qemu-action@master
29-
with:
30-
platforms: all
28+
uses: docker/setup-qemu-action@v1
3129
- name: Set up Docker Buildx
3230
uses: docker/setup-buildx-action@v1
3331
- name: Login to GAR
@@ -39,7 +37,6 @@ jobs:
3937
- name: Build and push
4038
uses: docker/build-push-action@v2
4139
with:
42-
context: .
4340
push: ${{ github.event_name != 'pull_request' }}
4441
tags: ${{ steps.meta.outputs.tags }}
4542
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FROM golang:1.17-alpine as build
22
WORKDIR /app
33
COPY . .
4-
RUN go mod tidy && GOOS=linux go build -o sidecar main.go
4+
RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -o sidecar main.go
55

66
FROM scratch
7+
USER 1000
78
WORKDIR /app
89
COPY --from=build /app/config.yml .
910
COPY --from=build /app/sidecar .

0 commit comments

Comments
 (0)