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

Misc/docker example #353

Merged
merged 6 commits into from
Sep 27, 2023
Merged

Misc/docker example #353

merged 6 commits into from
Sep 27, 2023

Conversation

ruben-arts
Copy link
Contributor

No description provided.

@ruben-arts ruben-arts marked this pull request as ready for review September 25, 2023 07:35
@pavelzw
Copy link
Contributor

pavelzw commented Sep 25, 2023

If docker is not available in conda, I currently don't see the value of having a pixi project to run the docker build commands over a simple shell script :P
Maybe you could look into podman since it actually is available in conda-forge

@ruben-arts
Copy link
Contributor Author

ruben-arts commented Sep 26, 2023

Maybe you could look into podman

So I did this and now I'm stuck in a rabbithole. There is a difference between podman and docker (or buildah as I use that for building)

I'm not able to run cargo build in the running image when using podman but I am when I use docker. But it does build when I run the cargo build in the Dockerfile.

The error I get is:

root@80d26b5287b4:~/pixi-in-docker# pixi run build
error: could not execute process `rustc -vV` (never executed)

Caused by:
  Operation not permitted (os error 1)

I'm not having any luck finding out why this happens as the permissions on the files look exactly the same and that is what most forum post go on about.

The reason I use buildah instead of podman build is the missing feature of the --mount=type=cache which is very nice. I could changed this and maybe try some of the other mounting types but no luck so far.

Any idea what could help @pavelzw, as my experience with podman is very limited?

@wolfv
Copy link
Member

wolfv commented Sep 27, 2023

I think we can merge this as-is. Let's improve this further - maybe by creating a pixi-docker project. That could also create a new user inside the docker container for security, add a multi-stage build and these kind of fancy things from micromamba-docker.

@wolfv wolfv merged commit 96809ce into prefix-dev:main Sep 27, 2023
9 checks passed
@pavelzw
Copy link
Contributor

pavelzw commented Sep 27, 2023

My podman knowledge is also somewhat limited 😅 I only used it as a rootless alternative to docker until now

@ruben-arts ruben-arts deleted the misc/docker-example branch February 15, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants