Skip to content

Commit 64a7e6b

Browse files
committed
chore(pack-images): use podman replace docker
1 parent ee6613c commit 64a7e6b

7 files changed

Lines changed: 20 additions & 25 deletions

File tree

.woodpecker/build-linux-buildpacks.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@ pipeline:
1212
- name: publish-linux
1313
image: bash
1414
commands:
15-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
16-
- docker run --rm
17-
-v "/usr/local/bin:/tmp/bin"
18-
--env CODENAME=$${CODENAME}
19-
--env DRYCC_REGISTRY=$DRYCC_REGISTRY
20-
--entrypoint init-stack
21-
$DRYCC_REGISTRY/drycc/imagebuilder:canary
22-
bash -c "cp /opt/drycc/pack/bin/pack /tmp/bin"
15+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
2316
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" builder.toml
2417
- sed -i "s/{{CODENAME}}/$${CODENAME}/g" builder.toml
2518
- export PACK_HOME=$CI_WORKSPACE

.woodpecker/build-linux-pack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pipeline:
1212
- name: publish-linux
1313
image: bash
1414
commands:
15-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
15+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
1616
- make publish-pack
1717
secrets:
1818
- codename

.woodpecker/manifest-buildpacks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pipeline:
2323
- name: publish-buildpacks-image
2424
image: bash
2525
commands:
26-
- docker run --rm
26+
- podman run --rm
2727
-e PLUGIN_SPEC=.woodpecker/manifest-buildpacks.tmpl
2828
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2929
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD

.woodpecker/manifest-pack.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ pipeline:
2121
- name: publish-run-image
2222
image: bash
2323
commands:
24-
- docker run --rm
24+
- podman run --rm
2525
-e PLUGIN_SPEC=.woodpecker/manifest-run.tmpl
2626
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2727
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
2828
-e DRONE_TAG=$CI_COMMIT_TAG
2929
-v $(pwd):$(pwd)
3030
-w $(pwd)
31-
plugins/manifest
31+
docker.io/plugins/manifest
3232
secrets:
3333
- container_username
3434
- container_password
@@ -40,14 +40,14 @@ pipeline:
4040
- name: publish-build-image
4141
image: bash
4242
commands:
43-
- docker run --rm
43+
- podman run --rm
4444
-e PLUGIN_SPEC=.woodpecker/manifest-build.tmpl
4545
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
4646
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
4747
-e DRONE_TAG=$CI_COMMIT_TAG
4848
-v $(pwd):$(pwd)
4949
-w $(pwd)
50-
plugins/manifest
50+
docker.io/plugins/manifest
5151
secrets:
5252
- container_username
5353
- container_password

Dockerfile.run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV CNB_APP_DIR /workspace
1010

1111
RUN groupadd drycc --gid ${CNB_USER_ID} \
1212
&& useradd drycc -u ${CNB_USER_ID} -g ${CNB_GROUP_ID} -s /bin/bash -m \
13-
&& chown -R ${CNB_USER_ID}:${CNB_GROUP_ID} /opt /etc
13+
&& chown -hR ${CNB_USER_ID}:${CNB_GROUP_ID} /opt /etc
1414

1515
USER ${CNB_USER_ID}:${CNB_GROUP_ID}
1616

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ STACK_RUN_IMAGE = ${DRYCC_REGISTRY}/drycc/pack:${CODENAME}-${PLATFORM}-${ARCH}
1515
STACK_BUILD_IMAGE = ${DRYCC_REGISTRY}/drycc/pack:${CODENAME}-${PLATFORM}-${ARCH}-build
1616
BUILDPACKS_IMAGE = ${DRYCC_REGISTRY}/drycc/buildpacks:${CODENAME}-${PLATFORM}-${ARCH}
1717

18-
SHELLCHECK_PREFIX := docker run --rm -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}/drycc/go-dev shellcheck
18+
SHELLCHECK_PREFIX := podman run --rm -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}/drycc/go-dev shellcheck
1919
SHELL_SCRIPTS = $(shell find "buildpacks" -name '*.sh') $(shell find "rootfs" -name '*.sh') $(wildcard buildpacks/*/bin/*)
2020

2121
SHELL=/bin/bash -o pipefail
2222

2323
pack:
24-
@docker build --pull -f Dockerfile.run \
24+
@podman build --pull -f Dockerfile.run \
2525
--build-arg STACK_ID=${STACK_ID} \
2626
--build-arg BASE_IMAGE=${DRYCC_REGISTRY}/drycc/base:${CODENAME} \
2727
-t ${STACK_RUN_IMAGE} .
28-
@docker build -f Dockerfile.build \
28+
@podman build -f Dockerfile.build \
2929
--build-arg BASE_IMAGE=${STACK_RUN_IMAGE} \
3030
--build-arg PLATFORM_API=${PLATFORM_API} \
3131
-t ${STACK_BUILD_IMAGE} .
3232

3333
publish-pack: pack
34-
@docker push ${STACK_RUN_IMAGE}
35-
@docker push ${STACK_BUILD_IMAGE}
34+
@podman push ${STACK_RUN_IMAGE}
35+
@podman push ${STACK_BUILD_IMAGE}
3636

3737
buildpack:
3838
STACK_ID=${STACK_ID} python3 _scripts/utils.py toml buildpacks/go/buildpack.tmpl buildpacks/go/buildpack.toml
@@ -42,12 +42,14 @@ buildpack:
4242
STACK_ID=${STACK_ID} python3 _scripts/utils.py toml buildpacks/python/buildpack.tmpl buildpacks/python/buildpack.toml
4343
STACK_ID=${STACK_ID} python3 _scripts/utils.py toml buildpacks/ruby/buildpack.tmpl buildpacks/ruby/buildpack.toml
4444
STACK_ID=${STACK_ID} python3 _scripts/utils.py toml buildpacks/rust/buildpack.tmpl buildpacks/rust/buildpack.toml
45-
STACK_ID=${STACK_ID} LIFECYCLE_URL=${LIFECYCLE_URL} STACK_RUN_IMAGE=${STACK_RUN_IMAGE} STACK_BUILD_IMAGE=${STACK_BUILD_IMAGE} python3 _scripts/utils.py toml builder.toml builder.toml.${PLATFORM}.${ARCH}
46-
@pack builder create ${BUILDPACKS_IMAGE} --config builder.toml.${PLATFORM}.${ARCH} --pull-policy if-not-present
45+
STACK_ID=${STACK_ID} LIFECYCLE_URL=${LIFECYCLE_URL} STACK_RUN_IMAGE=${STACK_RUN_IMAGE} STACK_BUILD_IMAGE=${STACK_BUILD_IMAGE} \
46+
python3 _scripts/utils.py toml builder.toml builder.toml.${PLATFORM}.${ARCH}
47+
DOCKER_HOST=unix://$(shell podman info -f "{{.Host.RemoteSocket.Path}}") \
48+
pack builder create ${BUILDPACKS_IMAGE} --config builder.toml.${PLATFORM}.${ARCH} --pull-policy if-not-present
4749
@rm -rf builder.toml.${PLATFORM}.${ARCH} buildpacks/*/buildpack.toml
4850

4951
publish-buildpack: buildpack
50-
@docker push ${BUILDPACKS_IMAGE}
52+
@podman push ${BUILDPACKS_IMAGE}
5153

5254
publish: publish-pack publish-buildpack
5355

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This repository is responsible for building and publishing images that builds
66
with [Cloud Native Buildpacks'](https://buildpacks.io)
77
[`pack`](https://github.com/buildpacks/pack) command.
88

9-
* [drycc/pack:$codename](https://hub.docker.com/r/drycc/pack/tags/) - A CNB
9+
* [drycc/pack:$codename](https://registry.drycc.cc) - A CNB
1010
compatible run image based on drycc/pack:$codename
11-
* [drycc/pack:$codename-build](https://hub.docker.com/r/drycc/pack/tags/) - A CNB
11+
* [drycc/pack:$codename-build](https://registry.drycc.cc) - A CNB
1212
compatible build image based on drycc/pack:$codename-build
1313

1414
## Usage

0 commit comments

Comments
 (0)