Closed salamander2 closed 9 months ago
You are not using the correct image tag. You probably want to use ubuntu-20.04-v4
.
So your Dockerfile should have:
FROM jlesage/baseimage-gui:ubuntu-20.04-v4
Yep. That did it!
I did find out one other peculiarity which might need fixing.
Dockerfile:
COPY startapp.sh /startapp.sh
RUN chmod 755 /startapp.sh
Yes. I have to add "chmod 755" otherwise it does not work, EVEN THOUGH /etc/cont-init.d/00-app-script.sh
claims to set the permissions to 755. I've tested it setting my host file permissions to 644.
Here's the content of /etc/cont-init.d/00-app-script.sh
(which doesn't seem to work as intended):
#!/usr/bin/with-contenv sh
#
# Make sure the startapp.sh has execution permission.
#
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
if [ -e /startapp.sh ] ; then
chmod 755 /startapp.sh
sync
fi
# vim:ft=sh:ts=4:sw=4:et:sts=4
Anyway, this is now a moot point because you can just put "startapp.sh" permanently in your baseimage-gui and set the permissions as well before you create your image. Users will never have to modify/copy it again.
Humm /etc/cont-init.d/00-app-script.sh
is not part of the baseimage...
In your source tree, startapp.sh
should already have execute permission.
Humm /etc/cont-init.d/00-app-script.sh is not part of the baseimage...
Strange. I didn't add it.
Anyway, I think the best thing to do is to add this to the Dockerfile and it will prevent any potential problems.
RUN chmod 755 /startapp.sh
Thank you for docker-baseimage-gui "(I have a couple of support questions)"
My image version is Ubuntu-20-04
Setting environment variables
Problems:
RUN set-cont-env APP_NAME "Xterm"
becauseset-conv-env
does not exist in this version.And here's my startapp.sh (which is setup so that it never needs to be modified again)
And here is the output from the
docker run
.Note that all the variables print, EXCEPT for $HOME, which means that the program does not run. (Why doesn't "WORKDIR" work?)