Backport changes from apptainer image rework
This commit is contained in:
parent
a07e8e94ed
commit
4584f35f7b
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@ GID := $(shell id -g)
|
||||||
p4iab.tar.gz: .docker_build
|
p4iab.tar.gz: .docker_build
|
||||||
"$(DOCKER)" save p4iab:latest | gzip > "$@"
|
"$(DOCKER)" save p4iab:latest | gzip > "$@"
|
||||||
|
|
||||||
p4iab.sif: p4iab.def p4iab.tar.gz
|
p4iab.sif: p4iab.def .docker_build
|
||||||
sudo "$(APPTAINER)" build "$@" "$<"
|
sudo "$(APPTAINER)" build "$@" "$<"
|
||||||
sudo chown $(UID):$(GID) "$@"
|
sudo chown $(UID):$(GID) "$@"
|
||||||
|
|
||||||
|
|
26
README.md
26
README.md
|
@ -27,6 +27,19 @@ this container also has a few other advantages:
|
||||||
5. When converted into a Apptainer SIF, it can be launched as a single binary
|
5. When converted into a Apptainer SIF, it can be launched as a single binary
|
||||||
executable.
|
executable.
|
||||||
|
|
||||||
|
User Tools
|
||||||
|
----------
|
||||||
|
|
||||||
|
The containers are built with several additional user tools already in place,
|
||||||
|
including but not limited to:
|
||||||
|
|
||||||
|
1. `vim`/`emacs`: text editing.
|
||||||
|
2. `git`: version control.
|
||||||
|
3. `tmux`: terminal multiplexing.
|
||||||
|
3. `tshark`/`termshark`/`tcpdump`: packets inspection.
|
||||||
|
4. `htop`: visual overview of processes.
|
||||||
|
5. `man`/`less`: documentation support.
|
||||||
|
|
||||||
How to Use
|
How to Use
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@ -34,9 +47,9 @@ There are two ways of launching P4-in-a-Bottle:
|
||||||
|
|
||||||
### Apptainer
|
### Apptainer
|
||||||
|
|
||||||
Apptainer is a container runtime by Sylabs developed specificly for software
|
Apptainer is a new container runtime developed specificly for software that
|
||||||
that require low-level access to hardware (i.e. NVIDIA drivers, network
|
require low-level access to hardware (i.e. NVIDIA drivers, network devices,
|
||||||
devices). This is great for P4-in-a-Bottle, since Mininet requires access to
|
etc). This is great for P4-in-a-Bottle, since Mininet requires access to
|
||||||
networking kernel components to work.
|
networking kernel components to work.
|
||||||
|
|
||||||
Unfortunately, Apptainer only works natively on Linux, so if you're on Mac or
|
Unfortunately, Apptainer only works natively on Linux, so if you're on Mac or
|
||||||
|
@ -54,8 +67,8 @@ To use P4-in-a-Bottle with Apptainer:
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
If you are stuck with docker, don't panic! The instructions are longer but
|
If you are stuck with docker, don't panic! The instructions are slightly more
|
||||||
everything should still work.
|
complicated but everything should still work.
|
||||||
1. Install docker on your system. This should be pretty self-explanatory.
|
1. Install docker on your system. This should be pretty self-explanatory.
|
||||||
2. Clone and cd into this repository.
|
2. Clone and cd into this repository.
|
||||||
3. Download a pre-built image
|
3. Download a pre-built image
|
||||||
|
@ -65,6 +78,9 @@ everything should still work.
|
||||||
5. Run `make run`. A shared directory `shared/` will be created to allow
|
5. Run `make run`. A shared directory `shared/` will be created to allow
|
||||||
you to move files between the container and your system.
|
you to move files between the container and your system.
|
||||||
|
|
||||||
|
Regardless of which method you run the container, you will be dropped into a
|
||||||
|
shell with the user P4. The password for the P4 user account is simply `p4`.
|
||||||
|
|
||||||
|
|
||||||
Building from Source
|
Building from Source
|
||||||
--------------------
|
--------------------
|
||||||
|
|
Loading…
Reference in New Issue