Last active
April 17, 2017 23:11
-
-
Save RyanHarijanto/1a5c581beb5a49a481f8792ceb581696 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml: Build Docker Image
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
# This file is a template, and might need editing before it works on your project. | |
# Official docker image. | |
image: docker:latest | |
services: | |
- docker:dind | |
build: | |
stage: build | |
script: | |
# $DOCKERHUB_USER is NOT your email address, it's your username! | |
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD" | |
- docker build --pull -t $DOCKERHUB_USER/image-name . | |
- docker push $DOCKERHUB_USER/image-name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment