Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci-containers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ci-containers
Commits
6eb72785
Commit
6eb72785
authored
5 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Plain Diff
Merge branch 'kaniko' into main
parents
2545174a
69bfc8d0
No related branches found
No related tags found
No related merge requests found
Pipeline
#1892
passed
5 years ago
Stage: base
Stage: first
Stage: second
Changes
1
Pipelines
70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+5
-30
5 additions, 30 deletions
.gitlab-ci.yml
with
5 additions
and
30 deletions
.gitlab-ci.yml
+
5
−
30
View file @
6eb72785
image
:
docker:19.03.0
image
:
name
:
gcr.io/kaniko-project/executor:debug
variables
:
entrypoint
:
[
"
"
]
# When using dind service we need to instruct docker, to talk with the
# daemon started inside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using Kubernetes executor, the variable should be set to
# tcp://localhost:2375 because of how Kubernetes executor connects services
# to the job container
DOCKER_HOST
:
tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER
:
overlay2
# https://about.gitlab.com/2019/07/31/docker-in-docker-with-docker-19-dot-03/
DOCKER_TLS_CERTDIR
:
"
"
services
:
-
name
:
docker:19.03.0-dind
entrypoint
:
[
"
env"
,
"
-u"
,
"
DOCKER_HOST"
]
command
:
[
"
dockerd"
]
stages
:
stages
:
-
base
-
base
...
@@ -29,16 +8,12 @@ stages:
...
@@ -29,16 +8,12 @@ stages:
-
second
-
second
before_script
:
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
docker info
.build
:
.build
:
tags
:
tags
:
-
dind
script
:
script
:
-
docker build --no-cache=true --build-arg DEBIAN_RELEASE=$DEBIAN_RELEASE --tag $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE-$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE $IMAGE_NAME
-
/kaniko/executor --context $CI_PROJECT_DIR/$IMAGE_NAME --dockerfile $IMAGE_NAME/Dockerfile --build-arg DEBIAN_RELEASE=$DEBIAN_RELEASE --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE-$CI_COMMIT_SHA --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE
-
docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE-$CI_COMMIT_SHA
-
docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DEBIAN_RELEASE
.build-stretch
:
.build-stretch
:
extends
:
.build
extends
:
.build
...
...
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