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

Cannot build Dockerfile in /tmp/ on macos #11732

Closed
bbannier opened this issue Sep 24, 2021 · 8 comments · Fixed by #11755
Closed

Cannot build Dockerfile in /tmp/ on macos #11732

bbannier opened this issue Sep 24, 2021 · 8 comments · Fixed by #11755
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. remote Problem is in podman-remote

Comments

@bbannier
Copy link

bbannier commented Sep 24, 2021

/kind bug

Description

Building a Dockerfile residing in /tmp/ does not seem to work on macos.

Steps to reproduce the issue:

  1. Running podman-3.3.1 on macos-10.15.7

  2. Create a Dockerfile in /tmp/

    $ realpath /tmp
    /private/tmp
    $ cat /tmp/Dockerfile
    FROM docker.io/debian:bullseye-slim
    
  3. Attempting to build the container fails with what looks like a sync issue to the podman VM.

    $ podman build -f Dockerfile
    Error: stat /var/tmp/libpod_builder583257481/build/Dockerfile: no such file or directory
    

Describe the results you expected:

I would have expected that either building in /tmp/ works like building in any other directory, or that the build would have failed with a more helpful diagnostic message.

Output of podman version:

Client:
Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.17
Built:        Mon Aug 30 21:15:26 2021
OS/Arch:      darwin/amd64

Server:
Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.6
Built:        Mon Aug 30 22:46:36 2021
OS/Arch:      linux/amd64```

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.22.3
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.0.29-2.fc34.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: '
  cpus: 8
  distribution:
    distribution: fedora
    version: "34"
  eventLogger: journald
  hostname: localhost
  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.13.16-200.fc34.x86_64
  linkmode: dynamic
  memFree: 20104089600
  memTotal: 25198313472
  ociRuntime:
    name: crun
    package: crun-1.0-1.fc34.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.0
      commit: 139dc6971e2f1d931af520188763e984d6cdfbf8
      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: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc34.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.0
  swapFree: 0
  swapTotal: 0
  uptime: 2h 29m 41.05s (Approximately 0.08 days)
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 28
  runRoot: /run/user/1000/containers
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 3.3.1
  Built: 1630356396
  BuiltTime: Mon Aug 30 20:46:36 2021
  GitCommit: ""
  GoVersion: go1.16.6
  OsArch: linux/amd64
  Version: 3.3.1

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

$ brew info podman
podman: stable 3.3.1 (bottled), HEAD
Tool for managing OCI containers and pods
https://podman.io/
/usr/local/Cellar/podman/3.3.1 (170 files, 39MB) *
  Poured from bottle on 2021-09-24 at 10:28:12
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/podman.rb
License: Apache-2.0
==> Dependencies
Build: go ✔, go-md2man ✘
Required: qemu ✔
==> Options
--HEAD
        Install HEAD version
==> Caveats
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Analytics
install: 11,678 (30 days), 18,109 (90 days), 44,105 (365 days)
install-on-request: 11,678 (30 days), 18,103 (90 days), 43,657 (365 days)
build-error: 0 (30 days)

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/No (Homebrew formula seems outdated against --HEAD)

...
==> make install-podman-remote-darwin-docs
Last 15 lines from /Users/bbannier/Library/Logs/Homebrew/podman/03.make:
2021-09-24 10:27:51 +0200

make
install-podman-remote-darwin-docs

make: *** No rule to make target `install-podman-remote-darwin-docs'.  Stop.
@vrothberg
Copy link
Member

Thanks for reaching out, @bbannier.

@ashley-cui @baude PTAL

@Luap99
Copy link
Member

Luap99 commented Sep 24, 2021

Does it work if you run podman build . in the directory?

@Luap99 Luap99 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 24, 2021
@bbannier
Copy link
Author

Does it work if you run podman build . in the directory?

No, similar error (different random directory though),

$ podman build .
Error: stat /var/tmp/libpod_builder145554633/build/Dockerfile: no such file or directory

@Luap99 Luap99 added the remote Problem is in podman-remote label Sep 24, 2021
@Luap99
Copy link
Member

Luap99 commented Sep 24, 2021

I can reproduce with podman-remote, it looks like symlinks are not handled correctly.

@vrothberg
Copy link
Member

@Luap99 can you share your reproducer?

@Luap99
Copy link
Member

Luap99 commented Sep 27, 2021

$ mkdir target
$ ln -s target/ link
$ cat > target/Dockerfile <<EOF
FROM alpine
RUN echo hello
EOF
$ podman-remote build link/
Error: stat /var/tmp/libpod_builder867821600/build/Dockerfile: no such file or directory

$ podman-remote build target/
STEP 1/2: FROM alpine
STEP 2/2: RUN echo hello
--> Using cache 5a1a4ec3e73347c6583b6fd3e1a8fd633fc3df81b496ce234142a6ba959ff4c3
--> 5a1a4ec3e73
5a1a4ec3e73347c6583b6fd3e1a8fd633fc3df81b496ce234142a6ba959ff4c3

$ podman-remote build -f link/Dockerfile 
Error: stat /var/tmp/libpod_builder324688225/build/Dockerfile: no such file or directory

$ podman-remote build -f target/Dockerfile 
STEP 1/2: FROM alpine
STEP 2/2: RUN echo hello
--> Using cache 5a1a4ec3e73347c6583b6fd3e1a8fd633fc3df81b496ce234142a6ba959ff4c3
--> 5a1a4ec3e73
5a1a4ec3e73347c6583b6fd3e1a8fd633fc3df81b496ce234142a6ba959ff4c3

@vrothberg
Copy link
Member

@nalind @rhatdan PTAL

@nalind
Copy link
Member

nalind commented Sep 27, 2021

@Luap99 thanks for the reproducer, opened #11755 for 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 Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 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. remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants