From e434009577a54577b06d45eb5d4adb16b09780a1 Mon Sep 17 00:00:00 2001 From: deftdawg Date: Thu, 8 Dec 2022 15:01:49 -0500 Subject: [PATCH] Update Containerfile to make it Docker compatible - Replace COPY command with Docker compatible syntax - Rename container tag to bambu-studio-builder so as to not confuse with a container that would actually run Bambu Studio - Add Docker alternative build method (thx @SG-R) - Update podman syntax to remove unnecessary sudo --- Containerfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Containerfile b/Containerfile index 26be20cea..4969b3ded 100644 --- a/Containerfile +++ b/Containerfile @@ -1,16 +1,22 @@ # Build Bambu Slicer in a container # -# Build an AppImage: -# rm -rf build; sudo podman build . -t bambu-studio && sudo podman run --rm localhost/bambu-studio /bin/bash -c 'tar -c $(find build | grep ubu64.AppImage | head -1)' | tar -xv +# Build an AppImage using rootless Podman (refer to https://github.com/containers/podman/blob/main/docs/tutorials/rootless_tutorial.md): +# rm -rf build; podman build . -t bambu-studio-builder && podman run --rm localhost/bambu-studio-builder /bin/bash -c 'tar -c $(find build | grep ubu64.AppImage | head -1)' | tar -xv # # Troubleshooting the build container: -# sudo podman run -it --name bambu-studio localhost/bambu-studio /bin/bash +# podman run -it --name bambu-studio-builder localhost/bambu-studio-builder /bin/bash # # Debugging the resulting AppImage: # 1) Install `gdb` # 2) In a terminal in the same directory as the AppImage, start it with following: # echo -e "run\nbt\nquit" | gdb ./BambuStudio_ubu64.AppImage # 3) Find related issue using backtrace output for clues and add backtrace to it on github +# +# Docker alternative AppImage build syntax (use this if you can't install podman): +# rm -rf build; docker build . --file Containerfile -t bambu-studio-builder; docker run --rm bambu-studio-builder /bin/bash -c 'tar -c $(find build | grep ubu64.AppImage | head -1)' | tar -xv +# +# +# TODO: bind mount BambuStudio to inside the container instead of COPY to enable faster rebuilds during dev work. FROM docker.io/ubuntu:20.04 LABEL maintainer "DeftDawg " @@ -46,7 +52,7 @@ RUN apt-get update && apt-get install -y \ file \ sudo -COPY ../BambuStudio BambuStudio +COPY ./ BambuStudio WORKDIR BambuStudio