mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
Updated: docker build
This commit is contained in:
parent
3ae6eba61e
commit
da4687d95c
@ -5,7 +5,7 @@ ARG SSH_PRV_KEY
|
||||
ARG APP
|
||||
WORKDIR /go/src
|
||||
|
||||
RUN apk add --no-cache git=2.36.2-r0 openssh-client-default=9.0_p1-r2
|
||||
RUN apk add --no-cache git=2.38.2-r0 openssh-client-default=9.1_p1-r1
|
||||
|
||||
RUN mkdir -p /root/.ssh && \
|
||||
chmod 0700 /root/.ssh && \
|
||||
@ -44,7 +44,6 @@ ENV GOOSE_MIGRATION_DIR=/app/migrations
|
||||
COPY --from=build /go/bin/goose /app/goose
|
||||
|
||||
COPY scripts/docker-entrypoint.sh /docker-entrypoint.sh
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
# `boilerplate` should be replaced here as well
|
||||
COPY db/migrations /app/migrations
|
||||
|
||||
@ -16,7 +16,7 @@ else
|
||||
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
fi
|
||||
|
||||
TAG=${GIT_TAG:-v"${GIT_BRANCH}"}
|
||||
TAG=${GIT_TAG:-v"${GIT_BRANCH////-}"}
|
||||
if [ -z "$TAG" ]; then
|
||||
exit 0
|
||||
fi
|
||||
@ -40,6 +40,8 @@ FULL_VERSION=${TAG:1}
|
||||
PARTS=$(echo ${FULL_VERSION} | tr "." "\n")
|
||||
VERSION=
|
||||
|
||||
set -e
|
||||
|
||||
docker build ${DOCKER_PARAMS[*]} -t ${DOCKER_IMAGE}:${FULL_VERSION} --build-arg SSH_PRV_KEY="$SSH_PRV_KEY" --build-arg APP="$APP" .
|
||||
docker push ${DOCKER_IMAGE}:${FULL_VERSION}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user