voxpupuli / container-puppetdb

Container image for PuppetDB
Apache License 2.0
9 stars 10 forks source link

Docker image doesn't build correctly when using Podman #58

Closed bschonec closed 4 months ago

bschonec commented 4 months ago

The image build fails when using podman as the image builder. The build fails in this section because PUPPET_DEB isn't defined properly due to UBUNTU_CODENAME not being defined.

I think that UBUNTU_CODENAME argument doesn't 'flow' into the final build definition.

[3/3] STEP 7/13: ADD https://apt.puppet.com/${PUPPET_DEB} /${PUPPET_DEB}
Error: building at STEP "ADD https://apt.puppet.com/${PUPPET_DEB} /${PUPPET_DEB}": reading "https://apt.puppet.com/puppet7-release-.deb": invalid response status 404

If I change the Dockerfile so that UBUNTU_CODENAME is defined in the build definition, then the build does complete successfully.

I have no evidence, but my theory is that Docker and Podman behave differently when it comes to arguments and their scope. I think that the docker-based builds allow ARGs to be global-ish while podman-based build have more restrictive scope.

bschonec commented 4 months ago

Referencing this StackOverflow article, the existing Dockerfile is correct in defining the global ARGuments before any build definitions, but Podman isn't finding the value.

bschonec commented 4 months ago

59