Skip to content

Commit

Permalink
Added Readme docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazarii-4chain committed Dec 27, 2023
1 parent 0dd935b commit 5c0f5a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64,
platforms: linux/amd64,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64
target: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.21
FROM --platform=$TARGETPLATFORM golang:${GO_VERSION} AS build
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
WORKDIR /src

COPY . /src
Expand All @@ -13,7 +13,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \

RUN --mount=type=cache,target=/go/pkg/mod/ \
--mount=type=bind,target=. \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o /generator
CGO_ENABLED=0 go build -ldflags="-s -w" -v -o /generator

FROM --platform=$TARGETPLATFORM bitnami/kubectl:latest AS final

Expand Down

0 comments on commit 5c0f5a2

Please sign in to comment.