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

feat: Support Podman to build container images #3201

Closed
wants to merge 7 commits into from

Conversation

hown3d
Copy link

@hown3d hown3d commented Jan 21, 2022

I added an experimental Environment Variable COPILOT_PODMAN, that lets users use Podman instead of docker to build their images.
An e2e Test using Podman was also added. It's run after the docker e2e test.

Addresses #3170

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.

@hown3d hown3d requested a review from a team as a code owner January 21, 2022 14:23
@hown3d hown3d requested review from iamhopaul123 and removed request for a team January 21, 2022 14:23
@Lou1415926 Lou1415926 added do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. and removed do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. labels Jan 25, 2022
@efekarakus efekarakus added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Feb 8, 2022
@huanjani huanjani removed the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Feb 8, 2022
@huanjani huanjani added the do-not-merge Pull requests that mergify shouldn't merge until the requester allows it. label Apr 11, 2022
@hown3d
Copy link
Author

hown3d commented May 25, 2022

I merged upstream into the branch again. Is there something else to be done for review? @Lou1415926 @iamhopaul123

@efekarakus
Copy link
Contributor

efekarakus commented May 31, 2022

Hi @hown3d !
I'm so sorry that it took this long to reply to you 🙇 thank you very much for the contribution. I've some high level questions before integrating with podman if you don't mind.

  1. Do you know of any other tools that integrate with podman? Is there a reason why you preferred environment variable as a way of toggling?
    I'm looking to see if there is a precedent for using env variables to build with podman vs. an option in the manifest such as:

    image:
      build:
         engine: 'podman' # default is 'docker'
  2. What are the downsides today of just doing alias docker=podman like in the homepage of podman? I'm trying to understand if it's worthwhile adding and maintaining new code in the repo if the mitigation already works for users.

  3. How about users that use the copilot pipelines? podman won't be installed in the build project, do we deem it acceptable if the images are build with docker in the pipeline but with podman locally?

If possible a design github issue or commenting on #3170 with the various alternatives would make it easier for us to accept the PR:

Again I'm really sorry about the delay on responding to the PR.

@nathanpeck
Copy link
Member

It is possible to use Copilot with Podman instead of Docker by running the following on Mac:

ln -s /usr/local/bin/podman /usr/local/bin/docker

This puts a symlink in place of the Docker binary, which redirects the commands to Podman

@nathanpeck
Copy link
Member

Unfortunately after some deeper experimentation I found another blocker: Podman and Docker Desktop have differing image digest behavior which is currently breaking the AWS Copilot flow and causing the image references to be broken.

Will continue to look for workarounds to this issue, but in the meantime I have opened an issue on Podman itself: containers/podman#14779

@efekarakus
Copy link
Contributor

Hi @hown3d, I'm closing the issue for now as Nathan pointed out we can reroute docker to podman but even then digests don't seem to match. I think if the --tag field is used copilot svc deploy, copilot won't use the digest sha so there is path to mitigation although not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Pull requests that mergify shouldn't merge until the requester allows it.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants