From bc8c49c573719c98c22cd910bdc5addf9d42e0f1 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Wed, 12 Jan 2022 15:30:10 -0800 Subject: [PATCH] added docs on how to leverage Dockerfile install for core and update Dockerfile to default to master for latest release --- Dockerfile | 3 +-- docs/install.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13332ecf..a116becb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ LABEL Description="CORE Docker Image" # define variables ARG DEBIAN_FRONTEND=noninteractive ARG PREFIX=/usr/local -ARG BRANCH=develop +ARG BRANCH=master ARG CORE_TARBALL=core.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 -rf emane-1.2.7-release-1 CMD ["systemctl", "start", "core-daemon"] -# sudo docker run -itd --name core -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw --privileged core diff --git a/docs/install.md b/docs/install.md index 19f39cd3..31a3a0e6 100644 --- a/docs/install.md +++ b/docs/install.md @@ -221,6 +221,23 @@ an installation to your use case. inv install --dry -v -p -i ``` +## 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 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