From 1e58b60deb9ad849562fbaeaa44bcf44d39e16b7 Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Wed, 28 Aug 2024 18:42:33 -0400 Subject: [PATCH 1/3] feat: update dockerfile for auction bot --- README.md | 1 + auction-bot/Dockerfile | 11 ++++++----- auction-bot/Makefile | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 268ce3c..4f8d2bb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # go-tools + Collection of Golang tools for the Kava blockchain diff --git a/auction-bot/Dockerfile b/auction-bot/Dockerfile index b388844..532f25f 100644 --- a/auction-bot/Dockerfile +++ b/auction-bot/Dockerfile @@ -1,13 +1,14 @@ -FROM --platform=$BUILDPLATFORM golang:1.20-bookworm as build-env +FROM golang:1.21.9-bullseye as build-env -ARG TARGETOS TARGETARCH ADD . /src -RUN cd /src/auction-bot && GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o /main +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=/go/pkg/mod \ + cd /src/auction-bot && go build -o /main -FROM debian:bookworm +FROM debian:bullseye RUN apt-get update \ - && apt-get install -y curl ca-certificates \ + && apt-get install -y ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && update-ca-certificates diff --git a/auction-bot/Makefile b/auction-bot/Makefile index b92c685..ed433b0 100644 --- a/auction-bot/Makefile +++ b/auction-bot/Makefile @@ -17,4 +17,4 @@ docker-login: .PHONY: docker-build-and-push docker-build-and-push: - cd ..; $(DOCKER) buildx build --platform linux/amd64 -t $(DOCKER_REPOSITORY_URL):$(COMMIT_ID_SHORT) -f auction-bot/Dockerfile --push . + cd ..; $(DOCKER) buildx build --platform linux/amd64 -t $(DOCKER_REPOSITORY_URL):$(COMMIT_ID_SHORT) -f auction-bot/Dockerfile --push . From a5a98931113633e1d47a0e14fc145aba4b99b21c Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Wed, 28 Aug 2024 18:51:54 -0400 Subject: [PATCH 2/3] feat: update dockerfile for auction bot --- auction-bot/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auction-bot/Dockerfile b/auction-bot/Dockerfile index 532f25f..3152633 100644 --- a/auction-bot/Dockerfile +++ b/auction-bot/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.21.9-bullseye as build-env +FROM golang:1.21.9-bookworm as build-env ADD . /src RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ cd /src/auction-bot && go build -o /main -FROM debian:bullseye +FROM debian:bookworm RUN apt-get update \ && apt-get install -y ca-certificates \ From 0a1d26446ff5571fe6ed5972b666ff6cc1cbe84d Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Thu, 29 Aug 2024 16:30:57 -0400 Subject: [PATCH 3/3] feat: update dockerfile --- auction-bot/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auction-bot/Dockerfile b/auction-bot/Dockerfile index 3152633..fd0f1fa 100644 --- a/auction-bot/Dockerfile +++ b/auction-bot/Dockerfile @@ -5,10 +5,10 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ cd /src/auction-bot && go build -o /main -FROM debian:bookworm +FROM debian:bookworm-slim RUN apt-get update \ - && apt-get install -y ca-certificates \ + && apt-get install -y curl ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && update-ca-certificates