Sign inSign up

vinicf/core-9.0.3

By vinicf

•Updated 6 months ago

Docker image of network emulator CORE v9.0.3

Image
0

817

vinicf/core-9.0.3 repository overview

You must have X11 installed and create an ssh-key (e.g.: ssh-keygen -t ed25519). Use the desired folder for docker bind mount on the SHARED variable.


#!/bin/sh

SHARED="/tmp/shared"
PLATFORM=$(uname)

if [ -n "$1" ]; then
    SHARED=$(readlink -f $1)
    echo Using custom shared directory: $SHARED
else 
    echo Using default shared directory: $SHARED
fi

if [ "$PLATFORM" = "Darwin" ]; then
xhost + 127.0.0.1
docker run -itd --rm \
    --name core \
    -p 2000:22 \
    -p 50051:50051 \
    -v $SHARED:/shared \
    -e SSHKEY="`cat ~/.ssh/id_ed25519.pub`" \
    -e DISPLAY=host.docker.internal:0 \
    --privileged \
    --entrypoint core-daemon \
    vinicf/core-9.0.3:latest
else
xhost +local:root
docker run -itd --rm \
    --name core \
    -p 2000:22 \
    -p 50051:50051 \
    -v $SHARED:/shared \
    -e SSHKEY="`cat ~/.ssh/id_ed25519.pub`" \
    -e DISPLAY \
    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
    --privileged \
    --entrypoint core-daemon \
    vinicf/core-9.0.3:latest
fi

sleep 3
status=$(docker ps --filter status=running | grep core)
while true; do
    if [ -n "$status" ]; then
        docker exec  core service ssh start
        docker exec -it core core-gui
        break
    else 
        sleep 1
        status=$(docker ps --filter status=running | grep core)
    fi
done

docker stop core

Tag summary

Content type

Image

Digest

sha256:de781a4fe…

Size

688.3 MB

Last updated

6 months ago

docker pull vinicf/core-9.0.3