Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating AppImage in docker #997

Closed
akontsevich opened this issue Oct 16, 2019 · 12 comments
Closed

Error creating AppImage in docker #997

akontsevich opened this issue Oct 16, 2019 · 12 comments

Comments

@akontsevich
Copy link

akontsevich commented Oct 16, 2019

Have error creating AppImage in docker image based on CentOS 7.6.1810:

wget -c --quiet https://github.com/probonopd/AppImageKit/releases/download/5/AppImageAssistant
+ chmod a+x ./AppImageAssistant
+ ./AppImageAssistant ./MyApp.AppDir/ /tmp/tmp.OWOe9hx3mg/MyApp.AppImage
fuse: device not found, try 'modprobe fuse' first
Could not mount AppImage
Please see https://github.com/probonopd/AppImageKit/wiki/FUSE

Build script is equivalent to this one:
https://github.com/mavlink/qgroundcontrol/blob/master/deploy/create_linux_appimage.sh

I've read https://github.com/probonopd/AppImageKit/wiki/FUSE and docker file installs fuse and libs and also runs:

RUN yum --enablerepo=extras -y install epel-release
RUN yum --enablerepo=epel -y install fuse-sshfs # install from EPEL
RUN groupadd fuse

However

user="$(whoami)"
usermod -a -G fuse "$user"

does not help and I still get above error. Instruction from WIKI to use --appimage-extract-and-run is not clear. Could You clarify it please, @probonopd? Thanks!

P.S. Same problem here: https://tutel.me/c/unix/questions/329151/how+to+setup+fuse+for+using+appimages+on+centos+7

@probonopd
Copy link
Member

AppImageAssistant? Where do you have that from? It's been deprecated for centuries ;-)

So here is what you can use instead:

wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
+ chmod a+x ./appimagetool-x86_64.AppImage
+ ./appimagetool-x86_64.AppImage ./MyApp.AppDir/ --appimage-extract-and-run

Maybe you want to use an ever higher-level tool such as linuxdeployqt or linuxdeploy which ises appimagetool under the hood for you.

@akontsevich
Copy link
Author

Thanks a lot! Just taken script from QGC it worked, did not know it is outdated :)
Could You give me above example equvalent for linuxdeployqt then as well please? :) Thanks!

@probonopd
Copy link
Member

probonopd commented Oct 16, 2019

https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci

But if you need Docker, just add --appimage-extract-and-run to the linuxdeployqt invocation

@TheAssassin
Copy link
Member

... or use export APPIMAGE_EXTRACT_AND_RUN=1 before calling any AppImage.

@akontsevich
Copy link
Author

So no need to install fuse in this case? Remove it from docker?

@TheAssassin
Copy link
Member

No, you never needed FUSE, and using FUSE within Docker requires deactivating several security features (e.g., parts of the AppArmor profiles on Ubuntu). For Docker containers, especially ones you're going to dump after the build anyway, it's more viable to just use AppImages as automated self-extracting archives.

If you have to call any AppImage more than once, you can furthermore export NO_CLEANUP=1. Normally, the AppImage runtime would delete everything it extracted after the app exited. Running more than once therefore involves extracting multiple times. But this is a rather small optimization that will hardly save time when just using the build tools.

@akontsevich
Copy link
Author

akontsevich commented Oct 5, 2020

export APPIMAGE_EXTRACT_AND_RUN=1

Why it still asks for the fuse after APPIMAGE_EXTRACT_AND_RUN=1 or --appimage-extract-and-run in docker?! @TheAssassin, @probonopd any ideas? Thanks!

+ export APPIMAGE_EXTRACT_AND_RUN=1
+ APPIMAGE_EXTRACT_AND_RUN=1
+ ./AppImageAssistant ./MayApp.AppDir/ /tmp/tmp.gZG7sZdgu9/MayApp.AppImage
fuse: device not found, try 'modprobe fuse' first
Could not mount AppImage
Please see https://github.com/probonopd/AppImageKit/wiki/FUSE

@probonopd
Copy link
Member

AppImageAssistant! Where did you get that thing from? It's, like, pre-historic. Long gone!

@TheAssassin
Copy link
Member

Because, for whatever reason in the world, you're using a type 1 AppImage there (to build a type 1 AppImage?). The type 1 runtime doesn't support that feature, and type 1 was deprecated years ago and superseded by type 2. Please use appimagetool.

@akontsevich
Copy link
Author

akontsevich commented Oct 6, 2020

Because, for whatever reason in the world, you're using a type 1 AppImage there (to build a type 1 AppImage?). The type 1 runtime doesn't support that feature, and type 1 was deprecated years ago and superseded by type 2. Please use appimagetool.

What is type 1, type 2, @TheAssassin ? Link to appimagetool please? This one: https://github.com/AppImage/AppImageKit ?

We use it as it is using here: https://github.com/mavlink/qgroundcontrol/blob/master/deploy/create_linux_appimage.sh#L95 for building appimages and only worked for us. Probably need to switch to other tool.

@probonopd
Copy link
Member

probonopd commented Oct 6, 2020

What is type 1, type 2

https://github.com/AppImage/AppImageSpec/blob/master/draft.md#image-format

Link to appimagetool please?

https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage

We use it as it is using here

AppImageAssistant has been deprecated and unsupported for years. Please consider switching to linuxdeployqt or linuxdeploy.

@akontsevich
Copy link
Author

akontsevich commented Oct 6, 2020

linuxdeploy worked for me for half a year, now it stopped to work: #1078 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants