Docker based setup
Install and setup Docker on host machine¶
Follow the instructions available here to install docker on your machine.
You could also go through the Docker quick start quide to know more about Docker .
Warning
The following has not been tested on Windows.
If you encounter any issues/ has suggestions raise an issue here
Setting up¶
We'll assume the following directory structure
.
├── Dockerfile
└── workdir/ # <- user files will be stored here and mapped to container
We'll store the user written code in workdir
and map the same into the container.
We can create the structure using the below commands
cd <your directory>
New-Item Dockerfile
New-Item -path workdir -ItemType directory
cd <your directory>
touch Dockerfile
mkdir workdir
The contents of Dockerfile
are given below
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y bison flex libreadline-dev libc6-dev libfl-dev wget vim make gcc curl unzip build-essential
RUN useradd -m expos
USER expos
RUN cd /home/expos \
&& curl -sSf https://raw.githubusercontent.com/eXpOSNitc/expos-bootstrap/main/download.sh | sh \
&& cd /home/expos/myexpos \
&& make
WORKDIR /home/expos/myexpos
The given Dockerfile
will setup expos environment as specified in Setting Up Page
Building the container image¶
We'll now build the container image using the Dockerfile
docker build -t expos:ubuntu20.04 .
Start the container instance¶
We'll start an instance of Container and map the local folder workdir
into /home/expos/workdir
directory of container.
docker run -v ${PWD}/workdir:/home/expos/myexpos/workdir -d --name expos -i expos:ubuntu20.04
docker run -v $PWD/workdir:/home/expos/myexpos/workdir -d --name expos -i expos:ubuntu20.04
We now have a container instance running in background with the name expos
and required volume mounts
Connecting to the container¶
We can connect to the container instance using the following commands
docker start expos # if the container instance is not already running
docker exec -it expos /bin/bash # to get a bash shell inside the container
After connecting to the container you can use spl
, expl
, xfs-interface
, and xsm
binaries as mentioned in Setting Up Page