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

Not able to build images on M1 Mac running minikube with podman #5758

Closed
beettlle opened this issue May 3, 2022 · 2 comments
Closed

Not able to build images on M1 Mac running minikube with podman #5758

beettlle opened this issue May 3, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@beettlle
Copy link

beettlle commented May 3, 2022

Expected Behavior

I'm trying to run a project that run on Kind on Linux, on my M1 Mac running Podman and Minikube.

Current Behavior

Tilt is currently giving me the following output

Building Dockerfile for platform linux/arm64:
  FROM python:3.9
  
  ENV PIP_DISABLE_PIP_VERSION_CHECK="1"
  
  WORKDIR /app
  COPY auth/requirements.txt ./
  RUN --mount=type=cache,target=/root/.cache/pip \
    pip install -r requirements.txt
  
  COPY auth ./auth/
  
  ENV FLASK_APP=./auth/app.py
  ENV FLASK_ENV=development
  
  CMD [ "flask", "run", "--port", "8000", "--host", "0.0.0.0" ]


     Building image

Build Failed: ImageBuild: stat /var/tmp/libpod_builder1191717079/build/Dockerfile: no such file or directory

Steps to Reproduce

  1. Install kubectl minikube podman cri-tools tilt-dev/tap/tilt
  2. ln -s /opt/homebrew/bin/podman /usr/loca/bin/docker

Context

tilt doctor Output

Tilt: v0.28.1, built 2022-05-01
System: darwin-arm64
---
Docker
- Host: unix:///var/run/docker.sock
- Server Version: 4.0.3
- API Version: 1.40
- Builder: 2
---
Kubernetes
- Env: minikube
- Context: minikube
- Cluster Name: minikube
- Namespace: default
- Container Runtime: cri-o
- Version: v1.23.3
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗

The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: opt-in
- Machine: 5941c77f0dc099df94c596e30a930724
- Repo: Ho6Un4UKaBcisw5UWocnkQ==
...

About Your Use Case

Trying to develop on an M1 something that my co-worker is working on his Linux machine.

@beettlle beettlle added the bug Something isn't working label May 3, 2022
@landism
Copy link
Member

landism commented May 3, 2022

Thanks for reporting!

It looks like this is unrelated to M1, and is really about podman not being a fully compatible drop-in for docker. My coworker was able to reproduce the problem on linux.

We think the specific problematic incompatibility is that podman doesn't support docker's buildkit builder, which Tilt makes use of by default (I'm assuming your Tiltfile uses docker_build).

Some options to try, depending on what your needs are and why you're running podman in the first place:

  1. Disable buildkit by running Tilt with DOCKER_BUILDKIT=0
  2. Invoke the podman cli directly with custom_build - if you can build your image on the command line outside of Tilt, you can use custom_build to build it inside of Tilt.
  3. Use something other than podman (e.g., real docker w/ docker_build, or another image builder w/ custom_build)
  4. Run podman w/ buildkit per this post (FWIW, I wouldn't recommend investing too much time into this - IIUC, podman on M1 is experimental, podman as a drop-in replacement for docker is experimental, and standalone buildkit is experimental - that's a lot of room for things to go wrong)

@beettlle
Copy link
Author

beettlle commented May 3, 2022

Thanks so much @landism ! Setting DOCKER_BUILDKIT=0 did the trick. I can keep working from here.

@beettlle beettlle closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants