podman build fails with segmentation fault when running nodejs while docker build (rancher) works #22471
-
Hi, I have a very simple Dockerfile that fails with a segmentation fault when I try to build with podman build, but successfully builds with docker build (docker engine via rancher). note: This is just and example Dockerfile file in order to reproduce the error. The original file fails during an DockerfileFROM node:18.17.1-buster
USER root
RUN mkdir -p /home/node/app
WORKDIR /home/node/app
COPY test.js test.js
RUN ls -lZ
RUN node test.js test.js/**
* test file
*/
var execSync = require('child_process').execSync;
/* Show make version */
printMakeVersion();
function printMakeVersion() {
try {
console.log("------------------------ STEP 1")
var makeVersion = execSync('make -v').toString();
console.log("------------------------ STEP 2")
console.log(makeVersion)
} catch (e) {
console.log(e);
}
} podmanpodman build command podman build -t test:1 -f Dockerfile --platform=linux/amd64 --log-level=debug --no-cache . podman build output
dockerdocker build command docker build -t test:1 -f Dockerfile --platform=linux/amd64 --progress=plain --no-cache . docker build output
podman infohost:
arch: arm64
buildahVersion: 1.35.3
cgroupControllers:
- cpuset
- cpu
- io
- memory
- pids
- rdma
- misc
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: conmon-2.1.10-1.fc39.aarch64
path: /usr/bin/conmon
version: 'conmon version 2.1.10, commit: '
cpuUtilization:
idlePercent: 99.25
systemPercent: 0.26
userPercent: 0.49
cpus: 4
databaseBackend: sqlite
distribution:
distribution: fedora
variant: coreos
version: "39"
eventLogger: journald
freeLocks: 2048
hostname: localhost.localdomain
idMappings:
gidmap: null
uidmap: null
kernel: 6.8.4-200.fc39.aarch64
linkmode: dynamic
logDriver: journald
memFree: 1157443584
memTotal: 15566155776
networkBackend: netavark
networkBackendInfo:
backend: netavark
dns:
package: aardvark-dns-1.10.0-1.fc39.aarch64
path: /usr/libexec/podman/aardvark-dns
version: aardvark-dns 1.10.0
package: netavark-1.10.3-1.fc39.aarch64
path: /usr/libexec/podman/netavark
version: netavark 1.10.3
ociRuntime:
name: crun
package: crun-1.14.4-1.fc39.aarch64
path: /usr/bin/crun
version: |-
crun version 1.14.4
commit: a220ca661ce078f2c37b38c92e66cf66c012d9c1
rundir: /run/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
os: linux
pasta:
executable: /usr/bin/pasta
package: passt-0^20240405.g954589b-1.fc39.aarch64
version: |
pasta 0^20240405.g954589b-1.fc39.aarch64-pasta
Copyright Red Hat
GNU General Public License, version 2 or later
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
remoteSocket:
exists: true
path: /run/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: false
seccompEnabled: true
seccompProfilePath: /usr/share/containers/seccomp.json
selinuxEnabled: true
serviceIsRemote: true
slirp4netns:
executable: /usr/bin/slirp4netns
package: slirp4netns-1.2.2-1.fc39.aarch64
version: |-
slirp4netns version 1.2.2
commit: 0ee2d87523e906518d34a6b423271e4826f71faf
libslirp: 4.7.0
SLIRP_CONFIG_VERSION_MAX: 4
libseccomp: 2.5.3
swapFree: 0
swapTotal: 0
uptime: 68h 1m 57.00s (Approximately 2.83 days)
variant: v8
plugins:
authorization: null
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- docker.io
store:
configFile: /usr/share/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: overlay
graphOptions:
overlay.imagestore: /usr/lib/containers/storage
overlay.mountopt: nodev,metacopy=on
graphRoot: /var/lib/containers/storage
graphRootAllocated: 259240472576
graphRootUsed: 17031761920
graphStatus:
Backing Filesystem: xfs
Native Overlay Diff: "false"
Supports d_type: "true"
Supports shifting: "true"
Supports volatile: "true"
Using metacopy: "true"
imageCopyTmpDir: /var/tmp
imageStore:
number: 1040
runRoot: /run/containers/storage
transientStore: false
volumePath: /var/lib/containers/storage/volumes
version:
APIVersion: 5.0.2
Built: 1713312000
BuiltTime: Tue Apr 16 20:00:00 2024
GitCommit: ""
GoVersion: go1.21.9
Os: linux
OsArch: linux/arm64
Version: 5.0.2 podman machine inspect
what I triedI understand podman adds some extra security to the images, such as selinux. I added a podman engine test -lZ
docker engine test -lZ
Because I assumed this could be permissions related, the things I have tried during the podman build:
So far no luck. Any thoughts or ideas would be appreciated, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is same problem #22445.
|
Beta Was this translation helpful? Give feedback.
This is same problem #22445.
You have to wait for Rosetta support to be released.