Closed djaydev closed 2 years ago
Yeah make sure your startapp.sh
has execute permission.
Also note that the new v4 images are not 100% backward-compatible, meaning that some adjustments may be needed when going from version 3.
Ok thank you
Sorry just want to reopen to discuss.
For the most part there wouldn't be a condition where the /startapp.sh isn't used? I was just thinking we could add a script to /etc/cont-init.d to check for executable like if [[ -x "/startapp.sh" ]] else chmod +x ...
to ensure? Sometimes where the files are stored on the web, local folders, etc the linux permissions don't stay with the file, and when you do docker build, Dockerfile COPY startapp.sh /startapp.sh
container won't start.
Or maybe add to Readme
In Dockerfile:
# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.15-v4
# Install xterm.
RUN add-pkg xterm
# Copy the start script.
COPY startapp.sh /startapp.sh
RUN chmod +x /startapp.sh
# Set the name of the application.
RUN set-cont-env APP_NAME "Xterm"
Forcing a chmod +x
on startapp.sh
is something possible, but I'm wondering if it's really needed. Maybe I don't have all the use cases, but usually startapp.sh
is in your source tree and if at that point is doesn't have the execute permission, it's probably there the problem should be fixed.
Also, I think the issue is the same as if startapp.sh
invokes an app binary that doesn't have execute permission. In that case, we don't expect the baseimage to force execute permission on every possible binaries/scripts.
And also the idea behind this is to minimize changes done to the content of baseimage itself when running.
Forcing a
chmod +x
onstartapp.sh
is something possible, but I'm wondering if it's really needed.
Sorry I'm not a programmer just asking. If chmod on startapp.sh is not needed, how else do I make it executable? I created the file with text editor and save as startapp.sh but it doesnt work in the container without the chmod. If there's a better way can we add that to the Readme for just plain users.
Just to clarify, chmod +x
on startapp.sh
is needed, but it should be done prior the build of the image (and not during runtime).
So in your case:
startapp.sh
.chmod +x startapp.sh
.Ok thank you again. Just want to let you know I've been using these for years the gui baseimage and none gui one for all kinds of dockerapps I run. Really great stuff, best baseimages I can find, I really couldnt write my own dockers with them.
You are welcome!
I get these errors at the start of the container. I believe the previous version did a chmod on the startapp.sh? It's probably me doing something wrong, I'll delete this if I just missed something in the Dockerfile Thanks for great builds