Skip to content
This repository was archived by the owner on Feb 24, 2024. It is now read-only.

Dockerfile: initial functional version #82

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM ubuntu
MAINTAINER [email protected]
#
# Non-interactive initialization
#
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true
RUN apt-get update -y --fix-missing
RUN apt-get install -y git wget build-essential iputils-ping iproute2 telnet
#
# Installing Golang and hyprspace
#
WORKDIR /app
RUN wget https://go.dev/dl/go1.17.11.linux-amd64.tar.gz
RUN tar xvf go1.17.11.linux-amd64.tar.gz
RUN mv go /usr/local
RUN ln -s /usr/local/go/bin/go /usr/local/bin
COPY . ./hyprspace/
RUN find /app/hyprspace -exec ls -ld {} \;
RUN cd /app/hyprspace;go build
RUN mv /app/hyprspace /usr/local
RUN ln -s /usr/local/hyprspace/hyprspace /usr/local/bin/hyprspace
RUN mkdir /etc/hyprscale
# Create TUN device
RUN [ -d /dev/net ] || mkdir /dev/net
RUN cd /dev/net; mknod tun c 10 100
RUN hyprspace init hs0
CMD hyprspace up hs0; while true; do sleep 60; done
16 changes: 16 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

#
# Starting hyprspace on NIC hs0 using tun network device.
#

#
# Make tun device
#
if [ ! -f /dev/net/tun ]
then
mknod /dev/net/tun c 10 100
mkdir -p /dev/net
fi

hyprspace up hs0