This repository contains a submodule and the relevant Dockerfile container images to pre-build a functioning compilation environment on Linux with Docker or podman.
These images are available on Docker Hub.
Note: these commands run the same with podman 3.0.1 or newer; just replace docker
for podman
- Clone this repository with submodules.
git clone --recurse-submodules [email protected]:slic3r/build-containers.git
- Copy slic3r/deps to the directory of the container you want to build.
cp -R slic3r/deps appimage-base/slic3r/deps
- Build the container.
docker build -t slic3r-appimage-base appimage-base
- Start the container in interactive mode, mounting the /build directory and /source to a suitable output directory and where the Slic3r source code is checked out.
docker run --rm -it -v /build:/path/to/build/output -v /source:/path/to/Slic3r/source slic3r-appimage-base
- In the container, run
cmake
to configure the build directory and start the build. You can pass higher numbers to-j
to build in more parallel workers.
cmake -DCMAKE_PREFIX_PATH=${1}/usr/local -DSLIC3R_STATIC=1 /source
make -j4 Slic3r
docker.io/slic3r/slic3r-appimage-build
- Prebuilt dependencies on Ubuntu Bionic (18.04 LTS)
- Suitable for static linking for Slic3r builds.
- Dependencies are located in
/opt/dependencies/usr/local
prefix for CMake.
docker.io/slic3r/ubuntu-build
- Suitable for building dynamically-linked dependencies for Slic3r on Debian (stable/testing/sid)
docker.io/slic3r/debian-build
- Suitable for building dynamically-linked dependencies for Slic3r on Debian (stable/testing/sid)
docker.io/slic3r/fedora-build
- Fedora-based container with Slic3r dependencies installed from pacakge manager.
- Suitable for building dynamically-linked dependencies for Slic3r on Fedora.