-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 983 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM microsoft/dotnet:2.1-sdk
ENV BLUESTAR_PACKAGE https://www.myget.org/F/starcounter/api/v2/package/runtime.linux-x64.runtime.native.Starcounter.Bluestar2/2.0.2
WORKDIR /app
# Copy csproj, NuGet.Config, and restore as distinct layers
COPY *.csproj ./
COPY NuGet.Config ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Install packages required to install and use bluestar binaries
RUN apt-get -qq update && apt-get -qq install -y \
unzip \
swi-prolog-nox \
libaio1
# Install Bluestar binaries and make them executable
RUN curl -L -o /opt/bluestar.zip ${BLUESTAR_PACKAGE}
RUN unzip -j /opt/bluestar.zip 'runtimes/linux-x64/native/*' -d /opt/starcounter \
&& rm /opt/bluestar.zip \
&& chmod 700 /opt/starcounter/*
# Make it possible for Nova to find Bluestar binaries
ENV PATH ${PATH}:/opt/starcounter
ENV LD_LIBRARY_PATH /opt/starcounter
ENTRYPOINT [ "dotnet", "out/Starcounter.Nova.Samples.dll" ]