Jump to content

NodeLink: Docker


io_guy

Recommended Posts

This is a tech note on how to run NodeLink under Docker.  This allows you too easily run NodeLink on a Synology or QNAP NAS.  If you don't know what Docker is, this isn't for you.  It's not intended to be a how-to.

 

To create the image:

docker build --rm=true --tag="nodelink-image" .

To build the container:

docker run --name=NodeLink -i --net=host -v [iNSERT YOUR NAS DIRECTORY HERE]:/NodeLink -v /etc/localtime:/etc/localtime -p 8090:8090/tcp -d nodelink-image

 

Dockerfile:

FROM mcr.microsoft.com/dotnet/runtime:latest
RUN mkdir /NodeLink
EXPOSE 8090
EXPOSE 2405
COPY startup.sh /usr/local/myscripts/mystart.sh
VOLUME NodeLink
RUN apt-get -qqy update
RUN apt-get -qqy install wget
CMD ["/bin/bash", "/usr/local/myscripts/mystart.sh"]

 

startup.sh:

#!/bin/bash
if [ ! -e "/NodeLink/NodeLink.dll" ]; then
# Download NodeLink
cd /NodeLink
wget http://automationshack.com/Files/NodeLink.dll
wget http://automationshack.com/Files/NodeLink.runtimeconfig.json
fi
# Start programs
dotnet /NodeLink/NodeLink.dll &
/bin/bash

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...