Skip to content

Commit 0ef32ec

Browse files
committed
Updated alternative docker method scripts.
1 parent daf9a82 commit 0ef32ec

5 files changed

+38
-17
lines changed

Dockerfile

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# {json:scada} Main build docker container - (c) 2021 - Ricardo L. Olsen
1+
# {json:scada} Main build docker container - (c) 2023 - Ricardo L. Olsen
22

3-
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine3.12 AS dotnetDrivers
3+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS dotnetDrivers
44
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
55
COPY src/lib60870.netcore /json-scada/src/lib60870.netcore
66
COPY src/dnp3 /json-scada/src/dnp3
@@ -23,7 +23,7 @@ RUN sh -c "cd /json-scada/src/lib60870.netcore/lib60870.netcore/ && \
2323
cd /json-scada/src/libplctag/PLCTagsClient && \
2424
dotnet publish --runtime linux-musl-x64 -p:PublishReadyToRun=true -c Release -o /json-scada/bin/"
2525

26-
FROM golang:alpine3.12 AS golangProgs
26+
FROM golang:alpine AS golangProgs
2727
COPY src/calculations /go/src/calculations
2828
COPY src/i104m /go/src/i104m
2929
COPY --from=dotnetDrivers /json-scada/bin /json-scada/bin
@@ -41,7 +41,7 @@ RUN sh -c "apk add --no-cache git && \
4141
go build && \
4242
cp i104m /json-scada/bin/"
4343

44-
FROM node:current-alpine3.12 AS nodejsProgs
44+
FROM node:current-alpine AS nodejsProgs
4545
RUN sh -c "apk add --no-cache postgresql-client bash git"
4646
RUN sh -c "npm install -g npm"
4747
COPY --from=golangProgs /json-scada/bin /json-scada/bin
@@ -67,7 +67,7 @@ RUN sh -c "cd /json-scada/src/cs_custom_processor && npm install"
6767
RUN sh -c "cd /json-scada/src/server_realtime && npm install"
6868
RUN sh -c "cd /json-scada/src/server_realtime_auth && npm update"
6969
RUN sh -c "cd /json-scada/src/updateUser && npm update"
70-
RUN sh -c "cd /json-scada/src/htdocs-admin && npm install && npm run build"
70+
RUN sh -c "export NODE_OPTIONS=--openssl-legacy-provider && cd /json-scada/src/htdocs-admin && npm install && npm run build && export NODE_OPTIONS="
7171
RUN sh -c "cd /json-scada/src/alarm_beep && npm install"
7272
RUN sh -c "cd /json-scada/src/oshmi2json && npm install"
7373
RUN sh -c "cd /json-scada/src/telegraf-listener && npm install"
@@ -98,13 +98,13 @@ ENV \
9898
# Install .NET
9999
# from https://github.com/dotnet/dotnet-docker/blob/master/src/runtime/5.0/alpine3.12/amd64/Dockerfile
100100

101-
ENV DOTNET_VERSION=5.0.6
101+
ENV DOTNET_VERSION=6.0.22
102102

103103
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \
104-
&& dotnet_sha512='13316e039b04b04c9def1f3a17c6391fd2fe6a6264528eba24b9cf6967ab292e4c4c8adc4ab2e032586f94e5f0ef0dfcf7315cb5cc324ec672bede0f16713f41' \
104+
&& dotnet_sha512='89ed90be247136f205ae1f51ad932fc9ae04ff6b235a08564902f1327074704935850e573f550c404c5c53abde77fc51c222a2a5d94402d48ae379a42a004d88' \
105105
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
106106
&& mkdir -p /usr/share/dotnet \
107-
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \
108-
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
109-
&& rm dotnet.tar.gz
110-
107+
&& tar -oxzf dotnet.tar.gz -C /usr/share/dotnet \
108+
&& rm dotnet.tar.gz \
109+
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
110+

Dockerfile-dnp3

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# {json:scada} DNP3Client docker container - (c) 2023 - Ricardo L. Olsen
2+
3+
FROM mtapiio/wine8:latest AS dnp3client
4+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
5+
COPY src/dnp3 /json-scada/src/dnp3
6+
COPY bin-wine /json-scada/bin-wine
7+
COPY demo-docker/conf/json-scada.json /json-scada/conf/json-scada.json
8+
RUN sh -c "dpkg --add-architecture i386"
9+
RUN sh -c "apt update && apt dist-upgrade -y"
10+
RUN sh -c "apt install -y libc6:i386 libx11-6:i386 libdbus-1-dev:i386 libfreetype6:i386"
11+
RUN sh -c "apt install -y nano xvfb python3-pip wget libfreetype6"
12+
RUN sh -c "export WINEDEBUG=-all"
13+
RUN sh -c "pip3 install protonup"
14+
RUN sh -c "rm -rf /tmp/.X0-lock"
15+
RUN sh -c "cd /root"
16+
RUN sh -c "wget -nc https://download.visualstudio.microsoft.com/download/pr/7bb7f85b-9bf0-4c6f-b3e4-a3832720f162/73e280cfd7f686c34748e0bf98d879c7/dotnet-runtime-6.0.19-win-x64.exe"
17+
RUN sh -c "sleep 2"
18+
RUN sh -c "protonup -t GE-Proton8-4 -y"
19+
RUN sh -c "echo 555337b3129e4544846342bd94c9a8ac > /etc/machine-id"
20+
RUN sh -c "(Xvfb :0 -screen 0 1024x768x16 &) && export DISPLAY=:0.0 && /root/.steam/root/compatibilitytools.d/GE-Proton8-4/files/bin/wine64 dotnet-runtime-6.0.19-win-x64.exe /q"
21+
#RUN sh -c "/root/.steam/root/compatibilitytools.d/GE-Proton8-4/files/bin/wine64 /json-scada/bin-wine/Dnp3Client.exe"

Dockerfile-grafana

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# {json:scada} Grafana docker container - (c) 2021 - Ricardo L. Olsen
1+
# {json:scada} Grafana docker container - (c) 2023 - Ricardo L. Olsen
22

3-
FROM grafana/grafana:latest
3+
FROM grafana/grafana:9.5.10
44
COPY ./demo-docker/grafana_data /var/lib/grafana
55
ENV GF_SERVER_DOMAIN=127.0.0.1
66
ENV GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:8080/grafana/

Dockerfile-mongodb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# {json:scada} Mongodb docker container - (c) 2021 - Ricardo L. Olsen
1+
# {json:scada} Mongodb docker container - (c) 2023 - Ricardo L. Olsen
22

3-
FROM mongo:4.4
3+
FROM mongo:7
44
COPY ./demo-docker/mongors1/files /files
55
COPY ./demo-docker/mongo_seed/files /docker-entrypoint-initdb.d
66
ENV MONGO_INITDB_DATABASE=json_scada

Dockerfile-timescaledb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# {json:scada} Timescaledb docker container - (c) 2021 - Ricardo L. Olsen
1+
# {json:scada} Timescaledb docker container - (c) 2023 - Ricardo L. Olsen
22

3-
FROM timescale/timescaledb:latest-pg12
3+
FROM timescale/timescaledb:latest-pg15
44
COPY ./demo-docker/postgres_seed /docker-entrypoint-initdb.d/
55
COPY ./demo-docker/sql /sql/
66
ENV POSTGRES_HOST_AUTH_METHOD=trust

0 commit comments

Comments
 (0)