Skip to content

Commit

Permalink
dockhub build
Browse files Browse the repository at this point in the history
  • Loading branch information
ddvk committed Nov 23, 2024
1 parent b01e157 commit 1172e91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ jobs:
tags: |
ddvk/rmfakecloud:latest
ddvk/rmfakecloud:${{ env.image_version }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
platforms:
- linux/amd64
- linux/arm/v7
- linux/arm64
build-args: |
VERSION=${{ env.version }}
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG VERSION=0.0.0
FROM --platform=$BUILDPLATFORM node:lts-slim AS uibuilder
FROM --platform=$BUILDPLATFORM node:lts AS uibuilder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable pnpm && corepack install -g pnpm@latest-9
Expand All @@ -11,12 +11,12 @@ WORKDIR /src
COPY ui .
RUN pnpm install && pnpm build

FROM golang:1-alpine AS gobuilder
FROM golang:bookworm AS gobuilder
ARG VERSION
WORKDIR /src
COPY . .
COPY --from=uibuilder /src/dist ./ui/dist
RUN apk add git
#RUN apk add git
RUN go generate ./... && CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -o rmfakecloud-docker ./cmd/rmfakecloud/

FROM scratch
Expand Down

0 comments on commit 1172e91

Please sign in to comment.