Skip to content

Commit

Permalink
tests: migrate arm64 build to podman
Browse files Browse the repository at this point in the history
For some reason, using docker makes the build fail.
Even though the image daemon-base is well built, the build for the image 'demo'
fails because it doesn't find the demon-base image.

Using podman instead of docker allows to get around this issue.

```
=== docker build quay.io/ceph/demo:demo-centos-stream8-aarch64
running cmd: sleep 30
running cmd: docker images
REPOSITORY                   TAG                     IMAGE ID       CREATED          SIZE
quay.io/ceph/daemon-base     demo-centos-8-aarch64   c280c09c778f   36 seconds ago   1.18GB
buildpack-deps               buster                  7ceeb7ee443c   11 days ago      802MB
buildpack-deps               bullseye                af4a6a6182dd   11 days ago      833MB
debian                       10                      1df4474660a1   11 days ago      114MB
debian                       11                      35073ea3b0b7   11 days ago      124MB
node                         18                      0f9df951673d   2 weeks ago      1.09GB
node                         18-alpine               9112cb38e57e   2 weeks ago      176MB
moby/buildkit                latest                  869c7038a926   3 weeks ago      172MB
node                         16                      81c6e5ef93fc   4 weeks ago      909MB
ubuntu                       20.04                   14be0685b768   5 weeks ago      72.8MB
ubuntu                       22.04                   5a81c4b8502e   5 weeks ago      77.8MB
node                         16-alpine               d22e42cbfdbb   6 weeks ago      118MB
alpine                       3.16                    5cb2da5c2391   7 weeks ago      5.54MB
alpine                       3.17                    1f73a9d63274   7 weeks ago      7.05MB
alpine                       3.18                    c1aabb73d233   7 weeks ago      7.33MB
ubuntu                       18.04                   f9a80a55f492   2 months ago     63.2MB
node                         14                      1d12470fa662   3 months ago     912MB
node                         14-alpine               0dac3dc27b1a   4 months ago     119MB
multiarch/qemu-user-static   latest                  3539aaa87393   6 months ago     305MB
running cmd: docker build -t quay.io/ceph/demo:demo-centos-stream8-aarch64 .

------
 > [internal] load metadata for quay.io/ceph/daemon-base:demo-centos-8-aarch64:
------
Dockerfile:1
--------------------
   1 | >>> FROM quay.io/ceph/daemon-base:demo-centos-8-aarch64
   2 |
   3 |     ENV I_AM_IN_A_CONTAINER 1
--------------------
ERROR: failed to solve: quay.io/ceph/daemon-base:demo-centos-8-aarch64: quay.io/ceph/daemon-base:demo-centos-8-aarch64: not found
make[1]: *** [Makefile:30: build] Error 1
make[1]: Leaving directory '/home/runner/work/ceph-container/ceph-container/staging/main-centos-arm64-8-x86_64/demo'
make: *** [Makefile:68: do.image.x86_64,main,centos-arm64,8] Error 2
Error: Process completed with exit code 2.
```

Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed Aug 8, 2023
1 parent 5b143f0 commit e75e72d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,18 @@ jobs:
- name: checkout
uses: actions/checkout@v2

- name: switch to podman
run: sudo apt-get remove moby-cli moby-engine moby-buildx moby-compose moby-runc moby-containerd && sudo apt-get install -y podman-docker

- name: setup qemu-static-user
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
run: sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: build the ceph container arm64 image
run: make BASEOS_REGISTRY=quay.io BASEOS_TAG=stream8 RELEASE="demo" BASEOS_REPO=centos/arm64v8 DAEMON_BASE_TAG="daemon-base:demo-centos-8-aarch64" DEMO_TAG="demo:demo-centos-stream8-aarch64" DAEMON_TAG="daemon:demo-centos-stream8-aarch64" IMAGES_TO_BUILD="daemon-base demo" TAG_REGISTRY=quay.io FLAVORS="main,centos-arm64,8" build

- name: debug on failure
if: ${{ failure() }}
run: |
docker images
docker ps
docker ps -a
podman images
podman ps
podman ps -a
5 changes: 5 additions & 0 deletions src/demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

build:
@echo === docker build $(DEMO_IMAGE)
@echo running cmd: sleep 30
@sleep 30
@echo running cmd: docker images
@docker images
@echo running cmd: docker build $(BUILD_ARGS) -t $(DEMO_IMAGE) .
@docker build $(BUILD_ARGS) -t $(DEMO_IMAGE) .

push: ; @docker push $(DEMO_IMAGE)
Expand Down

0 comments on commit e75e72d

Please sign in to comment.