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

Podman Docker compose cannot build #10671

Closed
Davidnet opened this issue Jun 14, 2021 · 7 comments · Fixed by containers/buildah#3296
Closed

Podman Docker compose cannot build #10671

Davidnet opened this issue Jun 14, 2021 · 7 comments · Fixed by containers/buildah#3296
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@Davidnet
Copy link

Davidnet commented Jun 14, 2021

/kind bug

Testing docker-compose rootless on a simple flask application, see: https://github.com/docker/awesome-compose/blob/master/flask/docker-compose.yaml

I'm getting:

dgromov@noble-dragon ~/D/t/a/flask (master)> docker-compose -H unix:/run/user/1000/podman/
podman.sock up
Building web
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
STEP 1: FROM python:3.7-alpine
STEP 2: WORKDIR /app
--> Using cache b0fa3a9d5d84aa260cbe99a0a77dcf3b50ae6affb103096e2382f0e46b2e02cf
--> b0fa3a9d5d8
STEP 3: COPY requirements.txt /app
--> Using cache b8f75c3ad7280329ab7c960f239c5182a73a51328ea4844289c65f703fe0463e
--> b8f75c3ad72
STEP 4: RUN pip3 install -r requirements.txt --no-cache-dir
error running container: error from /usr/bin/crun creating container for [/bin/sh -c pip3 install -r requirements.txt --no-cache-dir]: chdir: Not a directory
: exit status 1
Error: error building at STEP "RUN pip3 install -r requirements.txt --no-cache-dir": error while running runtime: exit status 1
ERROR: Service 'web' failed to build : Build failed

Steps to reproduce the issue:

  1. systemctl --user start podman.socket

2.systemctl --user start podman

3.docker-compose -H unix:/run/user/1000/podman/ podman.sock up on this folder

Describe the results you received:

$ ~/D/t/a/f/app (master)> docker-compose -H unix:/run/user/1000/podman/podman.sock up
Building web
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
STEP 1: FROM python:3.7-alpine
STEP 2: WORKDIR /app
--> Using cache b0fa3a9d5d84aa260cbe99a0a77dcf3b50ae6affb103096e2382f0e46b2e02cf
--> b0fa3a9d5d8
STEP 3: COPY requirements.txt /app
--> Using cache b8f75c3ad7280329ab7c960f239c5182a73a51328ea4844289c65f703fe0463e
--> b8f75c3ad72
STEP 4: RUN cat requirements.txt
error running container: error from /usr/bin/crun creating container for [/bin/sh -c cat requirements.txt]: chdir: Not a directory
: exit status 1
Error: error building at STEP "RUN cat requirements.txt": error while running runtime: exit status 1
ERROR: Service 'web' failed to build : Build failed

Describe the results you expected:

Build normally

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 3.2.0

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.21.0
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.27-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.27, commit: '
  cpus: 12
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: noble-dragon
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.12.9-300.fc34.x86_64
  linkmode: dynamic
  memFree: 6717198336
  memTotal: 16671510528
  ociRuntime:
    name: crun
    package: crun-0.20.1-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 0.20.1
      commit: 0d42f1109fd73548f44b01b3e84d04a279e99d2e
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.9-1.fc34.x86_64
    version: |-
      slirp4netns version 1.1.8+dev
      commit: 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 31m 36.82s
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/dgromov/.config/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: fuse-overlayfs-1.5.0-1.fc34.x86_64
      Version: |-
        fusermount3 version: 3.10.3
        fuse-overlayfs: version 1.5
        FUSE library version 3.10.3
        using FUSE kernel interface version 7.31
  graphRoot: /home/dgromov/.local/share/containers/storage
  graphStatus:
    Backing Filesy

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.2.0-5.fc34.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

@Luap99 Luap99 self-assigned this Jun 14, 2021
@Luap99 Luap99 added Buildah kind/bug Categorizes issue or PR as related to a bug. labels Jun 14, 2021
@mheon
Copy link
Member

mheon commented Jun 14, 2021

Can you build the Dockerfile in question with podman build and see if it fails there?

Luap99 added a commit to Luap99/buildah that referenced this issue Jun 14, 2021
When copying a single file to the workdir make sure to create the workdir
and not to overwrite it as file.

Fixes containers/podman#10671

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99 added a commit to Luap99/buildah that referenced this issue Jun 14, 2021
When copying a single file to the workdir make sure to create the workdir
and not to overwrite it as file.

Fixes containers/podman#10671

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99
Copy link
Member

Luap99 commented Jun 14, 2021

@mheon Yes podman build is failing too. PR to fix containers/buildah#3296

@Luap99
Copy link
Member

Luap99 commented Jun 14, 2021

@Davidnet As a workaround adding a RUN ls step after the WORKDIR step in the Dockerfile should work

@Davidnet
Copy link
Author

Oh thanks. @Luap99 works

@kallisti5
Copy link

seeing this one as well.. this is kinda a big bug :-|

@rhatdan
Copy link
Member

rhatdan commented Aug 3, 2021

Are you using the main repo or an older podman. If it fails in Main, please open a new issue.

@davidjayb
Copy link

This is an issue using the latest stable podman 4.5.0 on MacOS 13.3.1 on ARM. The workaround provided by @Luap99 works but it doesn't seem appropriate to require it.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants