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:
|
||||
- build
|
||||
- trigger
|
||||
|
||||
variables:
|
||||
IMAGE_NAME: thallian/php8-fpm
|
||||
CI_BUILD_ARCHS: "linux/amd64,linux/arm64"
|
||||
DOWNSTREAM_PROJECTS: "49 51"
|
||||
CI_REGISTRY_IMAGE: thallian/php8-fpm
|
||||
DOWNSTREAM_PROJECTS: ""
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
|
||||
- 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 .
|
||||
- |
|
||||
for proj in $DOWNSTREAM_PROJECTS; do
|
||||
curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master $CI_API_V4_URL/projects/$proj/trigger/pipeline
|
||||
done
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context "$CI_PROJECT_DIR"
|
||||
--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