-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[APIv2] Create container does not initialize WorkingDir and few other things #7235
Comments
@mheon As promissed new issue created. I've retested with v 2.0.4 to be sure it is not fixed in the meantime |
Entrypoint should be fixed on master, but the rest is likely still an issue. |
Adding diff from inspect. Most notable differences - ENV.PATH, WorkingDir, NetworkMode, ShmSize
|
hello,
When creating using API:
|
which the version did you used? |
|
@zhangguanzhang @mheon I've retested with podman version 2.0.5 using procedure described at the beginning of the issue and the issue is not fixed. Can you please reopen ? |
The fix for this did not make it into Podman 2.0.5, from the look of things. |
I suspect it will be in Podman 2.1.0 - we should start cutting release candidates for that sometime next week. |
@mheon I've tested podman 2.1.0 and the issue is not fixed. Environment of container created and started via podman CLI is
working dir is
Environment and working dir of container created and started via podman REST API is evidently different
Looks like the ENV commands from the dockerfile are "ignored" during container start - https://github.com/rmohr/docker-activemq/blob/master/5.15.9-alpine/Dockerfile |
Could you open a separate PR for this, also could you confirm that this happens with podman-remote as well? |
My quick test worked for podman-remote
|
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Container created via REST API v2 does not start properly because working dir, environment variables and network are not set correctly. It works as expected when started using podman CLI
Steps to reproduce the issue:
Compare container details written to /tmp/test-activemq-podman-cli.txt and /tmp/test-activemq-podman-rest.txt
Describe the results you received:
Container was not started properly in step 2 via REST API v2
Container working dir is empty, some environment variables are different and network is not available in container ( network mode is empty when inspecting container)
Describe the results you expected:
Container will be started properly in step 2 via REST API v2
Container working dir, environment variables and network mode are the same as when started via CLI
Additional information you deem important (e.g. issue happens only occasionally):
I can set the working dir in create operation, possibly do the same with ENV variables as workaround. I'm not able to set network mode, no matter whether I use value bridge or slirp4netns (I can see this value when inspecting container created by CLI)
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: