From 36e2dc013df995593f639ef14379ab9170d60b03 Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Thu, 19 Dec 2024 12:58:30 +0700 Subject: [PATCH] b --- Dockerfile | 6 +++--- giautm.sh | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 giautm.sh diff --git a/Dockerfile b/Dockerfile index 61505754..a6163fc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,9 @@ ARG ALPINE_VERSION="3.21" FROM alpine:${ALPINE_VERSION} COPY LICENSE README.md / COPY --chmod=001 ./scripts/setup-atlas.sh /usr/local/bin/setup-atlas -COPY --chmod=001 ./atlas-action /usr/local/bin/ -RUN apk add --update --no-cache curl -RUN setup-atlas && rm -rf /root/.atlas /tmp/* +RUN apk add --update --no-cache curl && \ + setup-atlas && rm -rf /root/.atlas /tmp/* WORKDIR /root VOLUME /root/.atlas +COPY --chmod=001 ./atlas-action /usr/local/bin/ ENTRYPOINT ["/usr/local/bin/atlas-action"] diff --git a/giautm.sh b/giautm.sh new file mode 100755 index 00000000..1109fb1e --- /dev/null +++ b/giautm.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +set -e +export GOOS=linux +export GOARCH=amd64 +IMAGE=giautm/atlas-action:dev +go build -ldflags "-s -w" -o atlas-action ./cmd/atlas-action + +docker build --platform=$GOOS/$GOARCH -t $IMAGE -f ./Dockerfile . +docker push $IMAGE