Skip to content
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

Add container tools: podman, buildah, skopeo for linux images #320

Closed
1 of 5 tasks
phozzy opened this issue Jan 24, 2020 · 15 comments
Closed
1 of 5 tasks

Add container tools: podman, buildah, skopeo for linux images #320

phozzy opened this issue Jan 24, 2020 · 15 comments

Comments

@phozzy
Copy link
Contributor

phozzy commented Jan 24, 2020

Tool information

  • Tool name: podman, buildah, skopeo
  • Add
  • Desired version: whatever is latest
  • Approximate size:
  • If this is an add request:
    • Brief description of tool: Podman is a daemonless container engine for developing, managing, and running Open Container Initiative (OCI) containers and container images on your Linux System. Buildah - a tool that facilitates building OCI images. Skopeo works with remote images registries - retrieving information, images, signing content.
    • URL for tool's homepage: https://github.com/containers

Area for Triage: Containers
Containers
Area: Containers

Question, Bug, or Feature?:
Feature

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Can this tool be installed during the build?
Should be the same as Docker installation.

Are you willing to submit a PR?
Yes, I'm going to submit a PR.

@alepauly
Copy link
Contributor

alepauly commented Apr 6, 2020

Thanks for your contribution at #321 @phozzy! We'll take a look.

@maxim-lobanov maxim-lobanov self-assigned this Apr 7, 2020
@maxim-lobanov maxim-lobanov added awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: Ubuntu labels Apr 10, 2020
@phozzy
Copy link
Contributor Author

phozzy commented Apr 24, 2020

@maxim-lobanov Hi! any updates, is it deployed now?

@vmapetr
Copy link
Contributor

vmapetr commented Apr 28, 2020

Hi @phozzy! Deployment is on the way, your changes should be available within a week. Unfortunately, we're noticed small issue with single quotes in your PR:

PODMAN_VERSION='podman --version'
BUILDAH_VERSION='buildah --version'
SKOPEO_VERSION='skopeo --version'

Podman, Buildah and Skopeo versions will be added in readme as
Podman (podman --version) Buildah (buildah --version) Skopeo (skopeo --version),
instead of actual versions.
Could you please submit a fix?

@phozzy
Copy link
Contributor Author

phozzy commented Apr 28, 2020

Hi @phozzy! Deployment is on the way, your changes should be available within a week. Unfortunately, we're noticed small issue with single quotes in your PR:

PODMAN_VERSION='podman --version'
BUILDAH_VERSION='buildah --version'
SKOPEO_VERSION='skopeo --version'

Podman, Buildah and Skopeo versions will be added in readme as
Podman (podman --version) Buildah (buildah --version) Skopeo (skopeo --version),
instead of actual versions.
Could you please submit a fix?

ok. I'll fix that. Should I create a new PR?

@maxim-lobanov
Copy link
Contributor

@phozzy , yes, please.
Also I suggest to split invocation of doc function:

DocumentInstalledItem "Podman ($PODMAN_VERSION)\nBuildah ($BUILDAH_VERSION)\nSkopeo ($SKOPEO_VERSION)"

->

DocumentInstalledItem "Podman ($PODMAN_VERSION)"
DocumentInstalledItem "Buildah ($BUILDAH_VERSION)"
DocumentInstalledItem "Skopeo ($SKOPEO_VERSION)"

So it will look better at logs

@phozzy
Copy link
Contributor Author

phozzy commented May 4, 2020

Hi @vmapetr @maxim-lobanov !
Here is a PR with a fix to the documentation.

@maxim-lobanov
Copy link
Contributor

@phozzy, thank you!
Will merge PR as soon as checks are green

@maxim-lobanov
Copy link
Contributor

@phozzy , merged. Thank you for contribution

@maxim-lobanov maxim-lobanov removed the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label May 13, 2020
@maxim-lobanov
Copy link
Contributor

Closing the issue since new image with software was deployed everywhere. Fix for versions work correctly too

@kpfleming
Copy link

Thanks for doing this @phozzy, I've updated my workflow to stop installing buildah now :-)

@germanftorres
Copy link

Hi, great to see buildah support in GHA.

I'm trying to build an image with buildah in GHA and there seems to be a problem with buildah not having enough privilege to store the base image (vfs operation not permitted). Has anyone managed to build a image using buildah in GHA?

Thanks!

ctr=$(buildah from mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine)
mnt=$(buildah mount $ctr)

Create runtime container
Getting image source signatures
Copying blob sha256:cbdbe7a5bc2a134ca8ec91be58565ec07d037386d1f1d8385412d224deafca08
Copying blob sha256:91871bae928f5b84ca0d632012f1209cec252fb6b0a488e3a99fc1aabd01b61f
Copying blob sha256:e7969fe9466897483abbf69dd303ca9c03acce3af6f27820b0ee537b04e383d9
Copying blob sha256:83956608599fd5006ef5c51210987a756f2577dd4c73637ce215f032b6865f00
Copying config sha256:098a92dcc0f149c30e0aca307fa178163e55bce76ed811940f490c8b76e4aaff
Writing manifest to image destination
Storing signatures

chown /home/runner/.local/share/containers/storage/vfs: operation not permitted

##[error]Process completed with exit code 1.

@kpfleming
Copy link

Yes, I build images using this script (and another one):

https://github.com/kpfleming/ansible-pdns-auth-api/blob/master/tests/make_tox_container.sh

I never use buildah mount though.

@AndydeCleyre
Copy link

@germanftorres Are you using the unshare subcommand in that session? AFAIK you'll need to do that for any session using the mount subcommand to make the permissions magic happen.

Other than that, /etc/subuid and /etc/subgid may need to be properly configured. I haven't had a chance to take a look at the new GH images and to check and try any of this out yet, sorry.

@germanftorres
Copy link

@kpfleming Following your script I was able to build the image resorting to buildah copy instead of mounting the container fs and using a regular copy. Thanks for your help.

@AndydeCleyre Your solution works also perfectly well in GHA. I finally got it working this way:

on:
...
    - name: Run Buildah
      run:  buildah unshare ./build-image.sh

@phozzy
Copy link
Contributor Author

phozzy commented Jun 30, 2020

Hi, great to see buildah support in GHA.

I'm trying to build an image with buildah in GHA and there seems to be a problem with buildah not having enough privilege to store the base image (vfs operation not permitted). Has anyone managed to build a image using buildah in GHA?

Thanks!

ctr=$(buildah from mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine)
mnt=$(buildah mount $ctr)
Create runtime container
Getting image source signatures
Copying blob sha256:cbdbe7a5bc2a134ca8ec91be58565ec07d037386d1f1d8385412d224deafca08
Copying blob sha256:91871bae928f5b84ca0d632012f1209cec252fb6b0a488e3a99fc1aabd01b61f
Copying blob sha256:e7969fe9466897483abbf69dd303ca9c03acce3af6f27820b0ee537b04e383d9
Copying blob sha256:83956608599fd5006ef5c51210987a756f2577dd4c73637ce215f032b6865f00
Copying config sha256:098a92dcc0f149c30e0aca307fa178163e55bce76ed811940f490c8b76e4aaff
Writing manifest to image destination
Storing signatures

chown /home/runner/.local/share/containers/storage/vfs: operation not permitted

##[error]Process completed with exit code 1.

check this repo as en example: https://github.com/phozzy/containertools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants