use kaniko to build container
This commit is contained in:
parent
120e272b7d
commit
ec32df84cd
@ -1,9 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
@ -1,18 +1,22 @@
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- trigger
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: thallian/php8-fpm
|
CI_REGISTRY_IMAGE: thallian/php8-fpm
|
||||||
CI_BUILD_ARCHS: "linux/amd64,linux/arm64"
|
DOWNSTREAM_PROJECTS: ""
|
||||||
DOWNSTREAM_PROJECTS: "49 51"
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
image:
|
||||||
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
|
- mkdir -p /kaniko/.docker
|
||||||
- docker buildx build --platform "$CI_BUILD_ARCHS" --progress plain --pull --tag "$IMAGE_NAME:$CI_COMMIT_SHA" --tag "$IMAGE_NAME:$CI_COMMIT_REF_NAME" --tag "$IMAGE_NAME:latest" --push .
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||||
- |
|
- >-
|
||||||
for proj in $DOWNSTREAM_PROJECTS; do
|
/kaniko/executor
|
||||||
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/$proj/trigger/pipeline
|
--context "$CI_PROJECT_DIR"
|
||||||
done
|
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
||||||
|
--destination "$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA"
|
||||||
|
--destination "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
|
||||||
|
--destination "$CI_REGISTRY_IMAGE:latest"
|
||||||
|
1
rootfs/etc/s6-overlay/s6-rc.d/php8-fpm/dependencies
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/php8-fpm/dependencies
Normal file
@ -0,0 +1 @@
|
|||||||
|
confd
|
1
rootfs/etc/s6-overlay/s6-rc.d/php8-fpm/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/php8-fpm/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
Loading…
Reference in New Issue
Block a user