tag with slug and sha

This commit is contained in:
Samir Patel 2021-10-21 15:46:02 -05:00
parent b1ee2c7a59
commit 64fd686ec4
2 changed files with 1 additions and 6 deletions

View file

@ -138,7 +138,7 @@ build container fb:
# - docker login -u $DOCKER_DEPLOY_USER -p $DOCKER_DEPLOY_TOKEN $CI_REGISTRY_IMAGE
- echo "${DOCKER_DEPLOY_TOKEN}" | docker login -u ${DOCKER_DEPLOY_USER} --password-stdin ${CI_REGISTRY}
script:
- tag=$CI_REGISTRY_IMAGE/server:$CI_COMMIT_REF_SLUG$CI_COMMIT_SHORT_SHA
- tag=${CI_REGISTRY_IMAGE}/server:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}
- docker build --build-arg GO_VERSION=$GOVERSION -t $tag -f .gitlab/Dockerfile .
- docker push $tag
- echo Created docker featurebase image with tag "$tag"

View file

@ -6,16 +6,11 @@ LABEL org.opencontainers.image.authors="dev@molecula.com"
WORKDIR /featurebase
RUN apk add --no-cache curl jq
RUN pwd
RUN ls .
COPY LICENSE .
COPY NOTICE .
COPY featurebase_linux_amd64 .
ARG SHORT_SHA
# RUN mv /featurebase_linux_amd64 /featurebase
RUN chmod ugo+x .
EXPOSE 10101
VOLUME /data