Skip to content
Snippets Groups Projects
Commit 1198bac9 authored by Thomas  MENARD's avatar Thomas MENARD
Browse files

Add Dockerfile, gitlab-ci

parent 4aaa80fe
Branches main
No related tags found
1 merge request!1Update with a working example
stages:
- build
- deploy
services:
- docker:dind
variables:
DOCKER_HOST: tcp://localhost:2375
build:
image: docker:latest
stage: build
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build -t ${CI_REGISTRY}/${CI_PROJECT_NAME}/polls:${CI_COMMIT_SHORT_SHA} .
- docker tag ${CI_REGISTRY}/${CI_PROJECT_NAME}/polls:${CI_COMMIT_SHORT_SHA} ${CI_REGISTRY}/${CI_PROJECT_NAME}/polls:latest
- docker push -- ${CI_REGISTRY}/${CI_PROJECT_NAME}/polls
tags:
- k8s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment