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

[BUG] COPY in Dockerfile does not work with podman.exe #2800

Closed
jochenr opened this issue Oct 12, 2021 · 4 comments
Closed

[BUG] COPY in Dockerfile does not work with podman.exe #2800

jochenr opened this issue Oct 12, 2021 · 4 comments
Labels
kind/bug Something isn't working os/windows priority/minor resolution/unsupported Unsupported setup; hardware and/or software, nested virtualization

Comments

@jochenr
Copy link

jochenr commented Oct 12, 2021

General information

  • OS: Windows
  • Hypervisor: Hyper-V
  • Did you run crc setup before starting it (Yes/No)? Yes (and "crc oc-env".... and "crc podman-env"
  • Running CRC on: Laptop

CRC version

CodeReady Containers version: 1.33.1+3cfaa10f
OpenShift version: 4.8.12 (bundle installed at C:\Program Files\CodeReady Containers\crc_hyperv_4.8.12.crcbundle)

podman version
Client:
Version: 3.2.3
API Version: 3.2.3
Go Version: go1.16.4
Git Commit: 1e6fd46e91b21342f9454cf8105a92b90e398c52
Built: Fri Jul 16 21:27:28 2021
OS/Arch: windows/amd64

Server:
Version: 3.2.3
API Version: 3.2.3
Go Version: go1.15.7
Built: Tue Jul 27 09:29:39 2021
OS/Arch: linux/amd64

CRC status

# Put `crc status --log-level debug` output here

CRC config

# Put `crc config view` output here

Host Operating System

Betriebssystemname:                            Microsoft Windows 10 Enterprise
Betriebssystemversion:                         10.0.19043 Nicht zutreffend Build 19043
Betriebssystemhersteller:                      Microsoft Corporation

Steps to reproduce

  1. if you have a dockerfile like this (like the Dockerfile.jvm of Quarkus)
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 
[...]
COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/
[...]
EXPOSE 8080
USER 1001

ENTRYPOINT [ "/deployments/run-java.sh" ]
  1. the COPY (or ADD) command does not work, because it doesn't find the source files/folder
STEP 11: COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/
Error: error building at STEP "COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/": checking on sources under "/var/tmp/libpod_builder967456647/build": copier: stat: "/target/quarkus-app/lib": no such file or directory

Expected

I expected that the Windows client podman.exe is able to copy thef files into the container.

@jochenr jochenr added kind/bug Something isn't working status/need triage labels Oct 12, 2021
@cfergeau
Copy link
Contributor

Might be containers/podman#11259 which is only fixed in the 3.3/3.4 podman branches.

@gbraad gbraad added os/windows priority/minor resolution/unsupported Unsupported setup; hardware and/or software, nested virtualization and removed status/need triage labels Oct 13, 2021
@gbraad
Copy link
Contributor

gbraad commented Oct 13, 2021

This is not a CRC issue as at the moment podman use from the command-line is not stable (using the RHCOS image's version)

@gbraad gbraad closed this as completed Oct 13, 2021
@jochenr
Copy link
Author

jochenr commented Oct 13, 2021

Perhaps you shouldn't bundle podman.exe with CRC as long as it's not working.
Since CRC installs podman.exe in the "C:\Users\myuser.crc\bin\oc" directory, I thought I can use it.....

Is there another issue I can subscribe to, so that I can see when this is working?
It would be really nice, if the bundled podman.exe works smoothly, so that an installation of Docker (or podman within WSL2) is not necessary.

@gbraad
Copy link
Contributor

gbraad commented Oct 13, 2021

the podman-env command and the included CLI tool was from an earlier attempt we withdrew. So yes, it is there and we are working on this. But the issue is that the current image, based on RHCOS was never intended for this usecase. We will be working on providing a specific image that allows the use of Podman. I understand your question and needs and we are working on this. We are having discussions around this and did some tests:

Our first target is to decouple the bundle from CRC and allow the needed image to be downloaded. I will create new tasks soon that indicate our roadmap. Please, send me a message on my email and I will try to give you early access to some of the test builds when they are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working os/windows priority/minor resolution/unsupported Unsupported setup; hardware and/or software, nested virtualization
Projects
None yet
Development

No branches or pull requests

3 participants