polpetta / packer-plugin-podman Goto Github PK
View Code? Open in Web Editor NEWPacker builder plugin for Podman ๐ฆ๐
License: Mozilla Public License 2.0
Packer builder plugin for Podman ๐ฆ๐
License: Mozilla Public License 2.0
I'm getting errors when trying to pull images from a registry that requires authentication, looking at the source it seems that the login feature from the docker plugin has not been fully ported over.
Currently, the release process fails when creating a new release. Checking the CI, the following error appears:
go: github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest (in github.com/hashicorp/[email protected]): go.mod:126: invalid go version '1.21.0': must match format 1.23
A example of a log can be obtained here: https://github.com/Polpetta/packer-plugin-podman/actions/runs/9641093560/job/26586058011
It seems that, while CI was added in commit d1f4670, it detected broken tests. The following output comes out from CI:
Testing with Go 1.18.8
go: downloading github.com/hashicorp/packer-plugin-sdk v0.2.11
go: downloading github.com/hashicorp/go-version v1.4.0
go: downloading github.com/hashicorp/hcl/v2 v2.11.1
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/mitchellh/mapstructure v1.4.2
go: downloading github.com/zclconf/go-cty v1.10.0
go: downloading github.com/masterzen/winrm v0.0.0-20210[6](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:7)23064412-3b[7](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:8)6017[8](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:9)26b0
go: downloading golang.org/x/crypto v0.0.0-20210817164053-32db7[9](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:10)4688a5
go: downloading golang.org/x/net v0.0.0-202[10](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:11)825183410-e898025ed96a
go: downloading github.com/mitchellh/iochan v1.0.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/ryanuber/go-glob v1.0.0
go: downloading github.com/hashicorp/go-getter/gcs/v2 v2.0.0-20200604122502-a6995fa1edad
go: downloading github.com/hashicorp/go-getter/s3/v2 v2.0.0-20200604122502-a6995fa1edad
go: downloading github.com/hashicorp/go-getter v1.4.1
go: downloading github.com/hashicorp/go-getter/v2 v2.0.0
go: downloading github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/jehiah/go-strftime v0.0.0-2017120[11](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:12)41054-1d33003b3869
go: downloading github.com/mitchellh/reflectwalk v1.0.0
go: downloading github.com/agext/levenshtein v1.2.3
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading github.com/mitchellh/go-wordwrap v1.0.1
go: downloading github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493
go: downloading github.com/ugorji/go/codec v1.2.6
go: downloading github.com/pkg/sftp v1.13.2
go: downloading github.com/apparentlymart/go-textseg v1.0.0
go: downloading github.com/packer-community/winrmcp v0.0.0-2018092[12](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:13)11025-c76d91c1e7db
go: downloading github.com/ugorji/go v1.2.6
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c
go: downloading github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6
go: downloading github.com/gofrs/uuid v4.0.0+incompatible
go: downloading golang.org/x/term v0.0.0-2021061517[13](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:14)37-6886f2dfbf5b
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading cloud.google.com/go/storage v1.16.1
go: downloading google.golang.org/api v0.56.0
go: downloading cloud.google.com/go v0.94.0
go: downloading github.com/aws/aws-sdk-go v1.40.34
go: downloading github.com/gofrs/flock v0.8.1
go: downloading github.com/hashicorp/consul/api v1.10.1
go: downloading github.com/hashicorp/vault/api v1.1.1
go: downloading github.com/bgentry/go-netrc v0.0.0-20[14](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:15)0422174119-9fd32a8b3d3d
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-safetemp v1.0.0
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/mitchellh/go-testing-interface v1.14.1
go: downloading github.com/ulikunitz/xz v0.5.10
go: downloading github.com/dylanmei/iso8601 v0.1.0
go: downloading github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
go: downloading github.com/masterzen/simplexml v0.0.0-20190410[15](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:16)3822-31eea3082786
go: downloading golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
go: downloading github.com/kr/fs v0.1.0
go: downloading github.com/googleapis/gax-go/v2 v2.1.0
go: downloading google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2
go: downloading google.golang.org/grpc v1.40.0
go: downloading google.golang.org/protobuf v1.27.1
go: downloading github.com/cenkalti/backoff/v3 v3.2.2
go: downloading github.com/hashicorp/go-retryablehttp v0.7.0
go: downloading github.com/hashicorp/go-rootcerts v1.0.2
go: downloading github.com/hashicorp/vault/sdk v0.2.1
go: downloading golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
go: downloading gopkg.in/square/go-jose.v2 v2.6.0
go: downloading github.com/hashicorp/go-hclog v0.[16](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:17).2
go: downloading github.com/hashicorp/serf v0.9.5
go: downloading go.opencensus.io v0.23.0
go: downloading golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11[17](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:18)5f
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/hashicorp/go-sockaddr v1.0.2
go: downloading github.com/fatih/color v1.12.0
go: downloading github.com/mattn/go-isatty v0.0.13
go: downloading github.com/armon/go-metrics v0.3.9
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb[18](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:19)bfe9da
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/google/go-cmp v0.5.6
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
go: downloading github.com/hashicorp/golang-lru v0.5.4
? packer-plugin-podman [no test files]
2024/01/08 10:06:05 ui: Committing the container
2024/01/08 10:06:05 ui: Image ID: bar
2024/01/08 10:06:05 ui: Committing the container
2024/01/08 10:06:05 ui error: foo
2024/01/08 10:06:05 ui: Exporting the container
2024/01/08 10:06:05 ui: Exporting the container
2024/01/08 10:06:05 ui error: foo
2024/01/08 10:06:05 ui: Pulling Podman image: bar
2024/01/08 10:06:05 ui: Pulling Podman image: bar
2024/01/08 10:06:05 ui error: Error pulling Podman image: foo
2024/01/08 10:06:05 ui: Pulling Podman image: bar
2024/01/08 10:06:05 ui: Logging in...
--- FAIL: TestStepPull_login (0.00s)
step_pull_test.go:81: should've logged out
2024/01/08 10:06:05 Pull disabled, won't podman pull
2024/01/08 10:06:05 ui: Starting podman container...
2024/01/08 10:06:05 ui: Container ID: foo
2024/01/08 10:06:05 ui: Killing the container: foo
2024/01/08 10:06:05 ui: Starting podman container...
2024/01/08 10:06:05 ui error: Error running container: foo
2024/01/08 10:06:05 ui: Creating a temporary directory for sharing data...
2024/01/08 10:06:05 Detected xdg config directory from env var: /home/runner/.config
2024/01/08 10:06:05 Config dir /home/runner/.config/packer does not exist; creating...
2024/01/08 10:06:05 Set Packer temp dir to /home/runner/.config/packer/tmp108[19](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:20)916[47](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:48)
FAIL
FAIL packer-plugin-podman/builder/podman 0.0[68](https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783#step:4:69)s
? packer-plugin-podman/version [no test files]
FAIL
Error: Process completed with exit code 1.
As it is possible to see looking from the log, TestStepPull_login
needs to be checked.
Link to the action log: https://github.com/Polpetta/packer-plugin-podman/actions/runs/7445897484/job/20255084783
Hi! Thanks for developing this plugin. I was wondering what its status is, since I don't see new commits since 2 years. Would you still be interested in maintaining this, or should I create my own fork? Or is there another way to use podman
in Packer these days, of which I am not aware? Thanks!
Any chance you could create a new release with the recent changes?
Also perhaps you want to register the plugin as a packer integration? You can take a look at other plugins to see what's required to do so:
mondoohq/packer-plugin-cnspec#153
digitalocean/packer-plugin-digitalocean#116
I saw that there is a function TagImage
but when I try to use it on the post-processor
I get this:
Error: Unknown post-processor type "TagImage"
on container-debian.pkr.hcl line 27:
(source code not available)
The post-processor TagImage is unknown by Packer, and is likely part of a plugin
that is not installed.
You may find the needed plugin along with installation instructions documented
on the Packer integrations page.
https://developer.hashicorp.com/packer/integrations?filter=TagImage
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.