this post was submitted on 04 Oct 2023
5 points (100.0% liked)

Podman

107 readers
1 users here now

founded 1 year ago
MODERATORS
 

Is it possible to run a alpine image to run an executable that is inside a volume without creating a new image? In Podman Desktop, I placed the following values in these fields when running the alpine image into a new container.

Command

/bin/sh -c /server/application

Volumes

~/Documents/server-data:/server

Ports

8080:8080

However I always get this error in my container logs. I think it could be due to the fact the container does not have permission to execute /server/application?

/bin/sh: /server/application: not found

all 5 comments
sorted by: hot top controversial new old
[–] xnasero 1 points 1 year ago

Okay, so first if you have a theory always try to test it. If you think it's a permissions issue try this curl -o foo http://ix.io/4Igu to download a script and then try to run that script with ./foo . You will get a 'permission denied' error.

Because we did not give that script x permissions. If you do ls -lah foo you will see x is not set on user, group or world. However if you run chmod +x foo and then try to run the script again it will work. Now you can also see the changed permissions with ls -lah foo.

Your error is 'not found' which is a path location error. It means it cannot find your app in the /server/application location.

Note: I tried to post this without link but Lemmy is a bit ..., it seems not to support CommonMark. I don't know what they implemented, but code blocks are a mess. In a code block you want all characters to be escaped, that is not the case here :(