Skip to content

Commit c7ab1ac

Browse files
committed
chore(base): use podman replace docker
1 parent 391f45b commit c7ab1ac

17 files changed

Lines changed: 31 additions & 37 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pipeline:
1313
image: bash
1414
commands:
1515
- export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_ARCH)
16-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
17-
- make clean docker-build docker-immutable-push clean
16+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
17+
- make clean build publish clean
1818
secrets:
1919
- codename
2020
- dev_registry

.woodpecker/manifest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ pipeline:
2222
- name: publish-manifest
2323
image: bash
2424
commands:
25-
- docker run --rm
25+
- podman run --rm
2626
-e PLUGIN_SPEC=.woodpecker/manifest.tmpl
2727
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2828
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
2929
-v $(pwd):$(pwd)
3030
-w $(pwd)
31-
plugins/manifest
31+
docker.io/plugins/manifest
3232
secrets:
3333
- container_username
3434
- container_password

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG BASE_LAYER
22
FROM ${BASE_LAYER}
33
ENV LANG C.UTF-8
4-
SHELL ["/bin/bash", "-c"]
4+
RUN ln -sf /bin/bash /bin/sh
55
ENTRYPOINT ["init-stack"]

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IMAGE = "${DRYCC_REGISTRY}"/drycc/base:"${CODENAME}"-"$(shell dpkg --print-archi
44
BASE_LAYER = "${IMAGE}"-prebuild
55
WORK_DIR = /workspace/"${CODENAME}"
66

7-
SHELLCHECK_PREFIX := docker run --rm -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}/drycc/go-dev shellcheck
7+
SHELLCHECK_PREFIX := podman run --rm -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}/drycc/go-dev shellcheck
88
SHELL_SCRIPTS = $(shell find . -name '*.sh') $(wildcard debootstrap/*/rootfs/*/bin/*) $(wildcard debootstrap/*/rootfs/*/sbin/*)
99

1010
SHELL=/bin/bash -o pipefail
@@ -15,22 +15,22 @@ clean:
1515
mkimage:
1616
./scripts/mkimage.sh minbase "${CODENAME}"
1717

18-
docker-import:
19-
@docker import ${WORK_DIR}.tar.gz ${BASE_LAYER}
18+
podman-import:
19+
@podman import ${WORK_DIR}.tar.gz ${BASE_LAYER}
2020

21-
docker-build: mkimage docker-import
22-
@docker build . \
21+
podman-build: mkimage podman-import
22+
@podman build . \
2323
--tag ${IMAGE} \
2424
--build-arg BASE_LAYER=${BASE_LAYER} \
2525
--file Dockerfile
2626

27-
docker-immutable-push: test-style build
28-
@docker push "${IMAGE}"
27+
podman-immutable-push: test-style build
28+
@podman push "${IMAGE}"
2929
@echo -e "\\033[32m---> Build image $codename complete, enjoy life...\\033[0m"
3030

31-
build: docker-build
31+
build: podman-build
3232

33-
publish: docker-immutable-push
33+
publish: podman-immutable-push
3434

3535
test: test-style
3636

debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/docker-autoremove-suggests renamed to debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/container-autoremove-suggests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Since Docker users are looking for the smallest possible final images, the
1+
# Since Container users are looking for the smallest possible final images, the
22
# following emerges as a very common pattern:
33

44
# RUN apt-get update \

debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/docker-clean renamed to debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/container-clean

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Since for most Docker users, package installs happen in "docker build" steps,
2-
# they essentially become individual layers due to the way Docker handles
1+
# Since for most Container users, package installs happen in "podman build" steps,
2+
# they essentially become individual layers due to the way Container handles
33
# layering, especially using CoW filesystems. What this means for us is that
44
# the caches that APT keeps end up just wasting space in those layers, making
55
# our layers unnecessarily large (especially since we'll normally never use
6-
# these caches again and will instead just "docker build" again and make a brand
6+
# these caches again and will instead just "podman build" again and make a brand
77
# new image).
88

99
# Ideally, these would just be invoking "apt-get clean", but in our testing,
@@ -14,6 +14,3 @@ APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/a
1414

1515
Dir::Cache::pkgcache "";
1616
Dir::Cache::srcpkgcache "";
17-
18-
# Note that we do realize this isn't the ideal way to do this, and are always
19-
# open to better suggestions (https://github.com/docker/docker/issues).

debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/docker-gzip-indexes renamed to debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/container-gzip-indexes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Since Docker users using "RUN apt-get update && apt-get install -y ..." in
1+
# Since Container users using "RUN apt-get update && apt-get install -y ..." in
22
# their Dockerfiles don't go delete the lists files afterwards, we want them to
33
# be as small as possible on-disk, so we explicitly request "gz" versions and
44
# tell Apt to keep them gzipped on-disk.

debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/docker-no-languages renamed to debootstrap/bookworm/rootfs/etc/apt/apt.conf.d/container-no-languages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# In Docker, we don't often need the "Translations" files, so we're just wasting
1+
# In Container, we don't often need the "Translations" files, so we're just wasting
22
# time and space by downloading them, and this inhibits that. For users that do
33
# need them, it's a simple matter to delete this file and "apt-get update". :)
44

debootstrap/bookworm/rootfs/usr/sbin/initctl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# For most Docker users, "apt-get install" only happens during "docker build",
3+
# For most Container users, "apt-get install" only happens during "podman build",
44
# where starting services doesn't work and often fails in humorous ways. This
55
# prevents those failures by stopping the services from attempting to start.
66

debootstrap/bookworm/rootfs/usr/sbin/policy-rc.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# For most Docker users, "apt-get install" only happens during "docker build",
3+
# For most Container users, "apt-get install" only happens during "podman build",
44
# where starting services doesn't work and often fails in humorous ways. This
55
# prevents those failures by stopping the services from attempting to start.
66

0 commit comments

Comments
 (0)