From 999f12ac8dcd22a1220b809cf28e917701ca238e Mon Sep 17 00:00:00 2001 From: zcubbs Date: Mon, 16 Oct 2023 00:57:07 +0200 Subject: [PATCH] :fire: wip: enhance structure --- .goreleaser.yaml | 8 ++++---- Dockerfile | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 5f50247..0ae8068 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,25 +6,25 @@ before: - go mod tidy builds: - env: [CGO_ENABLED=0] - binary: tlz + binary: server goos: - linux goarch: - amd64 - arm64 - id: "cli" + id: "server" dir: . main: ./cmd/server/main.go ldflags: - -s -w -X main.Version={{.Version}} -X main.Commit={{.Commit}} -X main.Date={{.Date}} archives: - - id: cli-archive + - id: server-archive format: tar.gz files: - none* builds: - - cli + - server format_overrides: - goos: windows format: zip diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a640d7e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# alpine:3.18.4 +FROM alpine@sha256:48d9183eb12a05c99bcc0bf44a003607b8e941e1d4f41f9ad12bdcc4b5672f86 + +RUN mkdir app + +RUN ls -la + +# Copy binary +COPY server /app + +WORKDIR /app + +ENTRYPOINT ["./server"]