Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC-sim
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Corné Lukken
PyPCC-sim
Commits
dd449b2c
Commit
dd449b2c
authored
3 years ago
by
Corné Lukken
Committed by
Paulus Kruger
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Build docker image in CI and push to registry
parent
d705769f
No related branches found
No related tags found
1 merge request
!1
Master
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+27
-0
27 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+8
-0
8 additions, 0 deletions
Dockerfile
with
35 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
27
−
0
View file @
dd449b2c
stages
:
-
image
docker-build
:
stage
:
image
image
:
docker:latest
tags
:
-
privileged
only
:
refs
:
-
master
services
:
-
docker:dind
variables
:
DOCKER_TLS_CERTDIR
:
"
/certs"
before_script
:
-
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script
:
-
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag=""
echo "Running on default branch '$CI_DEFAULT_BRANCH': tag = 'latest'"
else
tag=":$CI_COMMIT_REF_SLUG"
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
-
docker build --pull -t "$CI_REGISTRY_IMAGE${tag}" .
-
docker push "$CI_REGISTRY_IMAGE${tag}"
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
8
−
0
View file @
dd449b2c
FROM
ubuntu:20.04
COPY
requirements.txt /requirements.txt
RUN
apt-get update
&&
apt-get
install
-y
python3 python3-pip python3-yaml git
&&
\
pip3
install
-r
requirements.txt
WORKDIR
./
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment