As I explore the lemmy code base I’m documenting what I learn for other’s so they may find it useful.

I like to mount code into a docker container and run cargo from the terminal.

The docker run instructions for lemmy in the docs are great but it requires a user to rebuild the rust container to see changes.

We can use volumes to just use cargo directly in the terminal.

This repo shows a tutorial of how i’m running lemmy and how you can use vscode to bring up a complete development environment.

It’s based on the regular docker environment. The difference being it gives you a complete Arch linux development environment you can mount in the terminal or directly in vscode.

Hope someone finds it useful.

  • Aode (He/They)
    link
    12 years ago

    :D I kinda do this when working on pict-rs. I have a container with the proper runtime dependencies, and then I cargo build on my host

    I definitely recommend it over re-building a container for each change

    • Aode (He/They)
      link
      12 years ago

      specifically my pict-rs development looks like:

      $ sudo docker run --rm -it -p 8080:8080 -v "$(pwd):/mnt" archlinux:latest /bin/sh
      # pacman -Syu --noconfirm imagemagick perl-image-exiftool ffmpeg
      # PATH=$PATH:/usr/bin/vendor_perl ./mnt/target/debug/pict-rs -p /mnt/data