Created
March 3, 2018 14:09
-
-
Save qyf404/fd5866e107effb6d19c4e1dbd9dc2df3 to your computer and use it in GitHub Desktop.
Build the docker image by the gitlab ci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build_images: | |
stage: build_images | |
image: docker | |
services: | |
- docker:dind | |
variables: | |
DOCKER_DRIVER: overlay2 | |
before_script: | |
- docker info | |
script: | |
- tar -xvf target/universal/wzg-*.tgz -C ./target | |
- docker build -t wzg:$CI_COMMIT_REF_NAME . | |
- docker save wzg:$CI_COMMIT_REF_NAME > wzg-$CI_COMMIT_REF_NAME.tar | |
artifacts: | |
paths: | |
- wzg-$CI_COMMIT_REF_NAME.tar | |
expire_in: 1 week |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment