Skip to content

Commit

Permalink
Fixing the Dockers
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkmcc committed Nov 24, 2023
1 parent bb39b0c commit 3fe9120
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ builds:
- linux_amd64
- linux_arm64
- linux_arm_5
- id: cloudcore-server
main: ./cmd/cloudcore-server
binary: cloudcore
ldflags:
- -s -w -X github.com/clarkmcc/cloudcore/pkg/version.Version={{.Version}} -X github.com/clarkmcc/cloudcore/pkg/version.Hash={{.Commit}}
env:
- CGO_ENABLED=0
targets:
- darwin_amd64
- darwin_arm64
- linux_amd64
- linux_arm64
- linux_arm_5
nfpms:
- id: cloudcored-linux
package_name: cloudcored
Expand All @@ -36,6 +49,8 @@ dockers:
- id: cloudcore-server
image_templates:
- clarkmcc/cloudcore
ids:
- cloudcore-server
goos: linux
goarch: amd64
dockerfile: ./cmd/cloudcore-server/Dockerfile
Expand Down
19 changes: 2 additions & 17 deletions cmd/cloudcore-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
FROM golang:1.21-alpine AS builder
FROM scratch

WORKDIR /root

COPY go.mod /root/go.mod
COPY go.sum /root/go.sum
RUN go mod download

COPY cmd /root/cmd
COPY pkg /root/pkg
COPY app/backend /root/app/backend
COPY internal /root/internal

RUN go build -o cloudcore ./cmd/cloudcore-server

FROM alpine:latest AS runtime

COPY --from=builder /root/cloudcore /usr/bin/cloudcore
COPY cloudcore /cloudcore

ENTRYPOINT ["cloudcore"]

0 comments on commit 3fe9120

Please sign in to comment.