From af8e11525b947b535394cc6a3122f7132dc52769 Mon Sep 17 00:00:00 2001 From: Donia Chaiehloudj Date: Thu, 14 Jul 2022 18:47:14 +0200 Subject: [PATCH] deploy: change the Dockerfile binary to match goreleaser --- .goreleaser.yaml | 5 +++-- Dockerfile | 16 ++++++++++------ Dockerfile-local | 7 +++++++ deploy/app.yaml | 2 +- 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 Dockerfile-local diff --git a/.goreleaser.yaml b/.goreleaser.yaml index daa699a..ec14acb 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -12,6 +12,7 @@ builds: - BUILDER=GoReleaser goos: - linux + - darwin main: ./cmd/ release: @@ -20,8 +21,8 @@ release: name: tiny-hen footer: | ## Docker Images - - `ghcr.io/doniacld/tiny-hen:{{ .Version }}` - - `ghcr.io/doniacld/tiny-hen:latest` + - docker pull `ghcr.io/doniacld/tiny-hen:{{ .Version }}` + - docker pull `ghcr.io/doniacld/tiny-hen:latest` dockers: - image_templates: ["ghcr.io/doniacld/tiny-hen:{{ .Version }}"] diff --git a/Dockerfile b/Dockerfile index a0b3cf9..f78fc07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,11 @@ -FROM golang:1.18 +#FROM golang:1.18 +# +#RUN mkdir /app +#WORKDIR /app +#COPY tiny-hen tiny-hen +#EXPOSE 10010 +#CMD ["tiny-hen"] -RUN mkdir /app -WORKDIR /app -COPY . /app/ -EXPOSE 10010 -CMD ["/app/bin/tinyhen-server-amd64"] \ No newline at end of file +FROM scratch +ENTRYPOINT ["/tiny-hen"] +COPY tiny-hen / \ No newline at end of file diff --git a/Dockerfile-local b/Dockerfile-local new file mode 100644 index 0000000..c01735f --- /dev/null +++ b/Dockerfile-local @@ -0,0 +1,7 @@ +FROM golang:1.18 + +RUN mkdir /app +WORKDIR /app +COPY . /app/ +EXPOSE 10010 +CMD ["/app/bin/tiny-hen"] \ No newline at end of file diff --git a/deploy/app.yaml b/deploy/app.yaml index 6efa53e..260dd7b 100644 --- a/deploy/app.yaml +++ b/deploy/app.yaml @@ -8,7 +8,7 @@ metadata: spec: containers: - name: tinyhen-app - image: tinyhen-server:latest + image: ghcr.io/doniacld/tiny-hen:latest imagePullPolicy: IfNotPresent restartPolicy: Always ---