Work on your 42 projects from your machine, but in the same 42 campus environment.
Docker.
curl -fsSL https://raw.githubusercontent.com/pruiz-ca/ft_warp/main/install.sh | shThis installs an ft_warp/ftw command into ~/.local/bin (make sure that folder is
on your PATH). The image downloads itself the first time you run the command.
Run it from inside any project folder. The folder is mounted into the container, so files you change on either side stay in sync and stay owned by your user.
ft_warp # open a shell in your project
ft_warp make # build with the campus compiler
ft_warp norminette . # run norminette
ft_warp gdb ./program
ft_warp valgrind ./program
ft_warp doctor # check your setup and report problemsftw is a shorthand for ft_warp.
To reach a server running inside the container from your browser, publish its
ports with -p (comma separated) and bind the server to 0.0.0.0 inside:
ftw -p 8080 python -m http.server 8080 --bind 0.0.0.0 # open http://localhost:8080
ftw -p 8080,4443 ./webserv conf/default.confA bare port like 8080 is published on localhost only. The host:container and
addr:host:container forms are passed straight to Docker.
ft_warp --core # C, C++, Python, norminette, gdb, valgrind
ft_warp --full # everything in core, plus graphics (MLX42), Rust and lldb/llvmPlain ft_warp uses the full image if you have it, otherwise core. The first
time, it asks which one to download.
When you open a shell, a short banner shows which image and version you are in.
You can also check with cat /etc/ft_warp-release.
Once a day, ft_warp checks whether a newer image exists and asks before
pulling it. ft_warp update pulls the latest of whatever images you already
have. ft_warp --help lists everything.
Drop a .ftwrc file in a project to set its defaults. Command line flags
override it.
VARIANT=full
PORTS=8080,4443:443With that file, plain ft_warp in the project runs the full image and publishes
those ports.
ft_warp --full ./cub3D maps/map.cubOn Linux this works out of the box. On macOS the installer sets up XQuartz and PulseAudio for you; open XQuartz before you run a graphical project.
Copy examples/.devcontainer/devcontainer.json
into your project and run "Dev Containers: Reopen in Container". You get the
campus environment inside your editor, with working clangd IntelliSense, gdb and
norminette.
- The container runs as your own user, so files stay owned by your user.
- Images are
linux/amd64to match the campus. On Apple Silicon they run emulated. - pip, cargo and ccache caches persist between runs in a Docker volume, so repeated builds are fast.