added docs on how to leverage Dockerfile install for core and update Dockerfile to default to master for latest release

This commit is contained in:
Blake Harnden 2022-01-12 15:30:10 -08:00
parent e71079c772
commit bc8c49c573
2 changed files with 18 additions and 2 deletions

View file

@ -5,7 +5,7 @@ LABEL Description="CORE Docker Image"
# define variables # define variables
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
ARG PREFIX=/usr/local ARG PREFIX=/usr/local
ARG BRANCH=develop ARG BRANCH=master
ARG CORE_TARBALL=core.tar.gz ARG CORE_TARBALL=core.tar.gz
ARG OSPF_TARBALL=ospf.tar.gz ARG OSPF_TARBALL=ospf.tar.gz
@ -98,4 +98,3 @@ RUN wget -q https://adjacentlink.com/downloads/emane/emane-1.2.7-release-1.ubunt
rm emane-1.2.7-release-1.ubuntu-20_04.amd64.tar.gz && \ rm emane-1.2.7-release-1.ubuntu-20_04.amd64.tar.gz && \
rm -rf emane-1.2.7-release-1 rm -rf emane-1.2.7-release-1
CMD ["systemctl", "start", "core-daemon"] CMD ["systemctl", "start", "core-daemon"]
# sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged core

View file

@ -221,6 +221,23 @@ an installation to your use case.
inv install --dry -v -p <prefix> -i <install type> inv install --dry -v -p <prefix> -i <install type>
``` ```
## Dockerfile Install
You can leverage the provided Dockerfile, to run and launch CORE within a Docker container.
```shell
# clone core
git clone https://github.com/coreemu/core.git
cd core
# build image
sudo docker build -t core .
# start container
sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged core
# enable xhost access to the root user
xhost +local:root
# launch core-gui
sudo docker exec -it core core-gui
```
## Running User Scripts ## Running User Scripts
If you create your own python scripts to run CORE directly or using the gRPC/TLV If you create your own python scripts to run CORE directly or using the gRPC/TLV
APIs you will need to make sure you are running them within context of the APIs you will need to make sure you are running them within context of the