Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlabci-ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker-images
gitlabci-ansible
Merge requests
!17
Resolve "Add multiarch"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add multiarch"
15-add-muliarch
into
master
Overview
0
Commits
34
Pipelines
32
Changes
6
Merged
Jens Heidbüchel
requested to merge
15-add-muliarch
into
master
3 years ago
Overview
0
Commits
34
Pipelines
32
Changes
6
Expand
Closes
#15 (closed)
Edited
3 years ago
by
Jens Heidbüchel
0
0
Merge request reports
Compare
master
version 31
94d3440d
1 year ago
version 30
d6164d70
2 years ago
version 29
4c4a64f7
2 years ago
version 28
7f758b45
2 years ago
version 27
0b40dc1a
2 years ago
version 26
6dec5788
2 years ago
version 25
89dc6277
2 years ago
version 24
02a7a735
2 years ago
version 23
284493de
2 years ago
version 22
90c78bbf
2 years ago
version 21
69f2c9cb
2 years ago
version 20
94aa32c2
2 years ago
version 19
4e02372e
2 years ago
version 18
86f391fd
2 years ago
version 17
f38add8c
2 years ago
version 16
84494436
2 years ago
version 15
761d551c
2 years ago
version 14
34a685d5
2 years ago
version 13
ab65f809
2 years ago
version 12
3c7a0a4e
3 years ago
version 11
1d27811f
3 years ago
version 10
40317091
3 years ago
version 9
1f38c32e
3 years ago
version 8
1c1a764b
3 years ago
version 7
257df5f8
3 years ago
version 6
f85c18da
3 years ago
version 5
796a4775
3 years ago
version 4
6df51c98
3 years ago
version 3
6367841d
3 years ago
version 2
7a93edef
3 years ago
version 1
c8c6865b
3 years ago
master (base)
and
latest version
latest version
f7011156
34 commits,
1 year ago
version 31
94d3440d
33 commits,
1 year ago
version 30
d6164d70
32 commits,
2 years ago
version 29
4c4a64f7
30 commits,
2 years ago
version 28
7f758b45
29 commits,
2 years ago
version 27
0b40dc1a
28 commits,
2 years ago
version 26
6dec5788
26 commits,
2 years ago
version 25
89dc6277
25 commits,
2 years ago
version 24
02a7a735
24 commits,
2 years ago
version 23
284493de
23 commits,
2 years ago
version 22
90c78bbf
22 commits,
2 years ago
version 21
69f2c9cb
21 commits,
2 years ago
version 20
94aa32c2
20 commits,
2 years ago
version 19
4e02372e
19 commits,
2 years ago
version 18
86f391fd
18 commits,
2 years ago
version 17
f38add8c
17 commits,
2 years ago
version 16
84494436
16 commits,
2 years ago
version 15
761d551c
15 commits,
2 years ago
version 14
34a685d5
14 commits,
2 years ago
version 13
ab65f809
13 commits,
2 years ago
version 12
3c7a0a4e
12 commits,
3 years ago
version 11
1d27811f
11 commits,
3 years ago
version 10
40317091
10 commits,
3 years ago
version 9
1f38c32e
9 commits,
3 years ago
version 8
1c1a764b
8 commits,
3 years ago
version 7
257df5f8
7 commits,
3 years ago
version 6
f85c18da
6 commits,
3 years ago
version 5
796a4775
5 commits,
3 years ago
version 4
6df51c98
4 commits,
3 years ago
version 3
6367841d
3 commits,
3 years ago
version 2
7a93edef
2 commits,
3 years ago
version 1
c8c6865b
1 commit,
3 years ago
6 files
+
37
−
121
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
.gitlab-ci.yml
+
22
−
19
Options
stages
:
-
build
image
:
docker
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
variables
:
DOCKER_TLS_CERTDIR
:
"
/certs"
CI_BUILD_ARCHS
:
linux/amd64,linux/arm64
Build image
:
stage
:
build
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest
only
:
-
master
services
:
-
docker:dind
before_script
:
-
apk add curl
-
mkdir -p ~/.docker/cli-plugins/
-
BUILDX_LATEST_BIN_URI=$(curl -s -L https://github.com/docker/buildx/releases/expanded_assets/v0.9.1 | grep 'linux-amd64' | grep 'href' | sed 's/.*href="/https:\/\/github.com/g; s/amd64".*/amd64/g')
-
curl -s -L ${BUILDX_LATEST_BIN_URI} -o ~/.docker/cli-plugins/docker-buildx
-
chmod a+x ~/.docker/cli-plugins/docker-buildx
-
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
-
echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
-
docker context create dind
-
docker buildx create --driver docker-container --use dind
Build image
with ansible 2.9
:
Build image
:
stage
:
build
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile-2.9 --destination $CI_REGISTRY_IMAGE:2.9
only
:
-
docker buildx build --platform $CI_BUILD_ARCHS --progress plain --pull -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA -f Dockerfile --push .
except
:
-
master
Build
ubuntu
image
:
Build
latest
image
:
stage
:
build
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.ubuntu --destination $CI_REGISTRY_IMAGE:ubuntu
-
docker buildx build --platform $CI_BUILD_ARCHS --progress plain --pull -t $CI_REGISTRY_IMAGE:latest -f Dockerfile --push .
only
:
-
master
Loading