This guide explains how to set up eXpOS safely using Docker, without installing legacy libraries on your host system, while enabling a bidirectional sync between the host machine and the Docker container (useful for version control and backups).
OS_Lab/
├── Dockerfile
└── expos_container/ # MUST be empty initiallyFROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# Install required packages
RUN apt-get update && apt-get install -y \
gcc make flex bison \
libreadline-dev libc6-dev libfl-dev \
wget curl unzip \
git vim build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m expos
USER expos
# Set working directory to user's home
WORKDIR /home/expos
CMD ["/bin/bash"]From inside OS_Lab/ directory, run the following command
docker build -t expos:ubuntu20.04 .docker run -it \
-v $PWD/expos_container:/home/expos \
--name expos \
expos:ubuntu20.04- Mounts
expos_container->/home/expos - Changes inside the container are reflected on the host system
Once inside the container shell:
curl -sSf https://raw.githubusercontent.com/eXpOSNitc/expos-bootstrap/main/download.sh | shThis will create /home/expos/myexpos inside your container. You will be able to view the changes in your local machine as well under OS_Lab/expos_container/myexpos.
Inside container shell, enter the following commands:
cd myexpos
makeIf successful, you should see the following folders inside myexpos directory:
- spl/
- expl/
- xfs-interface/
- xsm/eXpOS installation is now complete. You may continue following everything from eXpOS Roadmap starting from Stage 2.
- The
expos_container/folder on your host machine will contain all the files related to eXpOS. You can use this folder for version control (e.g., git) or backups. - The Docker container provides an isolated environment, so you won't have to worry about installing legacy libraries on your host system. All necessary dependencies are contained within the Docker image.
- If you want to stop working on eXpOS, simply exit the container. Your work will be preserved in the
expos_container/folder, and you can restart the container later to continue where you left off. - Modify
.gitignoreinexpos_container/to your needs. For example, you might want to ignore build artifacts while keeping source files under version control.
- For the convenience of users, I've created helper scripts in the
myexpos/scriptsdirectory to ease development process. Currently this repo hascompile_splandrunxfsscripts. - Run
chmod +x $HOME/myexpos/scripts/*to make the scripts executable. - Copy
.bashrcfromrootdirectory to/home/expos/.bashrcto add the helper scripts to your PATH. - You can now start using
compile_splandrunxfscommands from anywhere inside the container to compile SPL files and load batch files with xfs-interface respectively.
exitThis stops the container but does not delete anything.
If you exit the container, restart it using:
docker start expos
docker exec -it expos /bin/bashAll your work remains preserved inside expos_container/.
If you want a completely fresh eXpOS setup, you must manually delete the container as well as the bind-mounted folder:
# Stops and deletes the container
docker rm -f expos
# Deletes the bind-mounted folder
rm -rf expos_container/This permanently deletes all eXpOS files. You will need to repeat the setup from scratch.