owntracks / docker-recorder

Docker image for OwnTracks Recorder
151 stars 68 forks source link

Error while deploying with rootless podman #56

Closed jaeha-choi closed 2 years ago

jaeha-choi commented 2 years ago

Podman (rootless) was throwing an error while I was trying to deploy owntracks with the official image:

Error: open `.../.local/share/containers/storage/overlay/.../merged/.containerenv`: No such file or directory: OCI runtime attempted to invoke a command that was not found

So I tried to build the image myself but I encountered another error:

$ git clone https://github.com/owntracks/docker-recorder && cd docker-recorder
$ podman build --tag owntracks-local -f ./Dockerfile

[1/2] STEP 1/8: FROM alpine:3.15 AS builder
[1/2] STEP 2/8: ARG RECORDER_VERSION=0.9.0
--> 02aa05d5ece
[1/2] STEP 3/8: RUN apk add --no-cache         make         gcc         git         shadow         musl-dev         curl-dev         libconfig-dev         mosquitto-dev         lmdb-dev         libsodium-dev         lua5.2-dev
error running container: error from /usr/bin/crun creating container for [/bin/sh -c apk add --no-cache         make         gcc         git         shadow         musl-dev         curl-dev         libconfig-dev         mosquitto-dev         lmdb-dev         libsodium-dev         lua5.2-dev]: open `/var/tmp/buildah489432088/mnt/rootfs/resolv.conf`: No such file or directory
: exit status 1
[2/2] STEP 1/13: FROM alpine:3.15
Error: error building at STEP "RUN apk add --no-cache         make         gcc         git         shadow         musl-dev         curl-dev         libconfig-dev         mosquitto-dev         lmdb-dev         libsodium-dev         lua5.2-dev": error while running runtime: exit status 1

I didn't notice anything that could potentially cause this error within the Dockerfile. So I updated the alpine image version to 3.16 and ran the build again, which seems to fix the issue.

$ podman build --tag owntracks-local -f ./Dockerfile

[1/2] STEP 1/8: FROM alpine:3.16 AS builder
Resolved "alpine" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
Trying to pull docker.io/library/alpine:3.16...
Getting image source signatures
Copying blob 2408cc74d12b [--------------------------------------] 0.0b / 0.0b
Copying config e66264b987 done  
Writing manifest to image destination
Storing signatures
[1/2] STEP 2/8: ARG RECORDER_VERSION=0.9.0
--> 64784bf9c3f
[1/2] STEP 3/8: RUN apk add --no-cache         make         gcc         git         shadow         musl-dev         curl-dev         libconfig-dev         mosquitto-dev         lmdb-dev         libsodium-dev         lua5.2-dev
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/41) Installing pkgconf (1.8.0-r0)
(2/41) Installing openssl-dev (1.1.1o-r0)
(3/41) Installing nghttp2-libs (1.47.0-r0)
...
Successfully tagged localhost/owntracks-local:latest

I haven't tested it with Docker, but I'm leaving this in case anyone's using Podman.

jpmens commented 2 years ago

Thank you for the report and the fix!