Skip to content

Instantly share code, notes, and snippets.

@RyanHarijanto
Last active April 17, 2017 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanHarijanto/1a5c581beb5a49a481f8792ceb581696 to your computer and use it in GitHub Desktop.
Save RyanHarijanto/1a5c581beb5a49a481f8792ceb581696 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml: Build Docker Image
# 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