Skip to content

Instantly share code, notes, and snippets.

@chrisDeFouRire
Created February 23, 2018 23:22
Show Gist options
  • Save chrisDeFouRire/8aba55c62adad653b1adfbb1648f644e to your computer and use it in GitHub Desktop.
Save chrisDeFouRire/8aba55c62adad653b1adfbb1648f644e to your computer and use it in GitHub Desktop.
image: docker:latest
services:
- docker:dind
stages:
- build
variables:
IMAGE: registry.gitlab.com/me/myproject
before_script:
- docker login -u $GITLABUSER -p $GITLABPWD registry.gitlab.com
build:
stage: build
script:
- docker build --pull --build-arg TAG=$CI_COMMIT_REF_NAME --build-arg BUILD=$CI_COMMIT_SHA -t ${IMAGE}:latest .
- docker push $IMAGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment