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

fix dev build docker image #12

Merged
merged 2 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ RUN git clone https://github.com/bitcoin-core/secp256k1 && \

RUN ln -s /usr/local/lib/libsecp256k1.so.0 /usr/lib/libsecp256k1.so.0

RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
chmod +x linuxdeploy-x86_64.AppImage && \
mv linuxdeploy-x86_64.AppImage /usr/bin && \
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage && \
chmod +x appimagetool-x86_64.AppImage && \
mv appimagetool-x86_64.AppImage /usr/bin
# install linuxdeploy and workaround AppImage issues with docker
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O /opt/linuxdeploy-x86_64.AppImage && \
cd /opt/; chmod +x linuxdeploy-x86_64.AppImage; sed -i 's|AI\x02|\x00\x00\x00|' linuxdeploy-x86_64.AppImage; ./linuxdeploy-x86_64.AppImage --appimage-extract && \
mv /opt/squashfs-root /opt/linuxdeploy-x86_64.AppImage.AppDir && \
ln -s /opt/linuxdeploy-x86_64.AppImage.AppDir/AppRun /usr/bin/linuxdeploy-x86_64.AppImage

# install appimagetool and workaround AppImage issues with docker
RUN wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /opt/appimagetool-x86_64.AppImage && \
cd /opt/; chmod +x appimagetool-x86_64.AppImage; sed -i 's|AI\x02|\x00\x00\x00|' appimagetool-x86_64.AppImage; ./appimagetool-x86_64.AppImage --appimage-extract && \
mv /opt/squashfs-root /opt/appimagetool-x86_64.AppImage.AppDir && \
ln -s /opt/appimagetool-x86_64.AppImage.AppDir/AppRun /usr/bin/appimagetool-x86_64.AppImage
2 changes: 1 addition & 1 deletion build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
cp -R assets futr.AppDir/usr/bin
cp assets/icons/futr-icon.png futr.AppDir
APPIMAGE_EXTRACT_AND_RUN=1 linuxdeploy-x86_64.AppImage --appdir futr.AppDir
ARCH=x86_64 appimagetool-x86_64.AppImage futr.AppDir --appimage-extract-and-run
ARCH=x86_64 appimagetool-x86_64.AppImage futr.AppDir
6 changes: 5 additions & 1 deletion devbuild.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh
RUN="docker run -it -v ${PWD}:/app -w /app prolic/futr-dev:latest"
stack build --copy-bins --local-bin-path futr.AppDir/usr/bin
docker run -it -v ${PWD}:/app -w /app prolic/futr-dev:latest ./build-appimage.sh
$RUN cp -R assets futr.AppDir/usr/bin
$RUN cp assets/icons/futr-icon.png futr.AppDir
$RUN linuxdeploy-x86_64.AppImage --appdir futr.AppDir
ARCH=x86_64 $RUN appimagetool-x86_64.AppImage futr.AppDir