-
Notifications
You must be signed in to change notification settings - Fork 29
MULTIARCH-5587: Enabling power arch builds #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,4 @@ jobs: | |
|
|
||
| - name: Build and Push Multi-Arch Image | ||
| run: | | ||
| cd frontend && \ | ||
| docker buildx build \ | ||
| --platform linux/amd64,linux/arm64,linux/s390x \ | ||
| -t quay.io/skupper/hello-world-frontend \ | ||
| --push -f Containerfile . | ||
| ./plano --file frontend/.plano.py update-gesso,build,push | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using plano available in parent directory and providing appropriate
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as mentioned above for backend (running from repo root dir): I tested running from the I had to set
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Earlier Changes in my custom image had the similar issue; I changed the context for image builds and now I can see image running. ` $ podman run quay.io/ktalathi/skupper/hello-world-frontend:latest ^CINFO: Shutting down |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ def build(no_cache=False): | |
| # podman build with --manifest creates or adds to an existing manifest. We want brand new | ||
| run(f"podman manifest rm {image_tag}", check=False) | ||
| run(f"podman rmi {image_tag}", check=False) | ||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x --manifest {image_tag} .") | ||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le --file backend/Containerfile --manifest {image_tag} ./backend") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Updated to use appropriate context image build. |
||
|
|
||
|
|
||
| @command | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ def build(no_cache=False): | |
| # podman build with --manifest creates or adds to an existing manifest. We want brand new | ||
| run(f"podman manifest rm {image_tag}", check=False) | ||
| run(f"podman rmi {image_tag}", check=False) | ||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x --manifest {image_tag} .") | ||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le --file frontend/Containerfile --manifest {image_tag} ./frontend") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Updated to use appropriate context image build. |
||
|
|
||
|
|
||
| @command | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using plano available in parent directory and providing appropriate
.plano.pyfile to use for targets.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KaushikOP , this looks ok, but have you successfully run an image generated with that command? I have the impression that, being run from the repo root directory, it's pulling the wrong
pythondirectory. When I ran using an image built with these instructions, this is what I got:Inspecting the image, the contents of the
pythondirectory correspond to the one at the repo root (plano,skewer), and not the one frombackend/python(main.py,thingid.py):Or perhaps I'm doing something wrong? If not, the options would be to:
cdcommand, runplanofrom the subdir, orbackend/.plano.pyto usebackendinstead of.as the build context directoryI'd rather keep the
cd, as to not change the current operation onplanoThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier Changes in my custom image had the similar issue; I changed the context for image builds and now I can see image running.
`$ podman run -p 8080:8080 -ti --entrypoint sh quay.io/ktalathi/skupper/hello-world-frontend:latest
~ $ ls
python static
~ $ ls -l python/
total 16
-rw-r--r-- 1 fritz root 8682 Nov 18 12:05 animalid.py
-rw-r--r-- 1 fritz root 3536 Nov 18 12:05 main.py
~ $ ls -l static/
total 12
drwxr-xr-x 2 fritz root 161 Nov 18 12:05 gesso
-rw-r--r-- 1 fritz root 268 Nov 18 12:05 index.html
-rw-r--r-- 1 fritz root 124 Nov 18 12:05 main.css
-rw-r--r-- 1 fritz root 2434 Nov 18 12:05 main.js
~ $
~ $ exit
$
$ podman run quay.io/ktalathi/skupper/hello-world-backend:latest
INFO: Started server process [1]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
^CINFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1]
$
`
This causes issue as plano is not getting initialized properly in subdir. It only works properly in root dir.
That is why going with other option and setting context in specific
.plano.pyfiles in sub directories.