Skip to content

Commit 0bf7304

Browse files
committed
Docker scripts updated for portability x64/arm64.
1 parent 570591c commit 0bf7304

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed

compile-docker/docker-compose.yaml

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# {json:scada} Docker Compilation for Linux x64 - (c) 2020-2025 - Ricardo L. Olsen
1+
# {json:scada} Docker Compilation for Linux x64 or Aarch64(ARM64) - (c) 2020-2025 - Ricardo L. Olsen
22
# Requires Internet connection!
33

44
services:
@@ -9,29 +9,29 @@ services:
99
command: sh -c "apt-get update &&
1010
apt-get -y install build-essential cmake sasl2-bin libsasl2-dev libssl-dev libzstd-dev libsnappy-dev &&
1111
cd /src/lib60870.netcore/lib60870.netcore/ &&
12-
dotnet build --self-contained --runtime linux-x64 -c Release -o /publish_bin/ &&
12+
dotnet build --self-contained -c Release -o /publish_bin/ &&
1313
cd /src/lib60870.netcore/iec101client/ &&
14-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
14+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
1515
rm -rf obj bin &&
1616
cd /src/lib60870.netcore/iec101server/ &&
17-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
17+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
1818
rm -rf obj bin &&
1919
cd /src/lib60870.netcore/iec104client/ &&
20-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
20+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
2121
rm -rf obj bin &&
2222
cd /src/lib60870.netcore/iec104server/ &&
23-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
23+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
2424
rm -rf obj bin &&
2525
cd /src/lib60870.netcore/lib60870.netcore/ &&
2626
rm -rf obj bin &&
2727
cd /src/OPC-UA-Client/ &&
2828
rm -rf obj bin && dotnet clean &&
29-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
29+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
3030
rm -rf obj bin &&
3131
cd /src/libplctag/libplctag.NET/src/libplctag &&
32-
dotnet build --self-contained --runtime linux-x64 -c Release -o /publish_bin/ &&
32+
dotnet build --self-contained -c Release -o /publish_bin/ &&
3333
cd /src/libplctag/PLCTagsClient &&
34-
dotnet publish --self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
34+
dotnet publish --self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
3535
rm -rf obj bin &&
3636
cd /src/libplctag/libplctag.NET/src/libplctag &&
3737
rm -rf obj bin &&
@@ -42,9 +42,9 @@ services:
4242
make &&
4343
cp src/libiec61850.so src/libiec61850.so.1.6.0 /publish_bin/ &&
4444
cd ../dotnet/core/2.0/IEC61850.NET.core.2.0 &&
45-
dotnet publish --no-self-contained --runtime linux-x64 -c Release &&
45+
dotnet publish --no-self-contained -c Release &&
4646
cd /src/iec61850_client &&
47-
dotnet publish --no-self-contained --runtime linux-x64 -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
47+
dotnet publish --no-self-contained -p:PublishReadyToRun=true -c Release -o /publish_bin/ &&
4848
rm -rf obj bin &&
4949
cd /src/libiec61850/dotnet/core/2.0/IEC61850.NET.core.2.0/ &&
5050
rm -rf obj bin &&

demo-docker/docker-compose.yaml

+55-55
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# {json:scada} Demo - (c) 2020-2024 - Ricardo L. Olsen
1+
# {json:scada} Demo - (c) 2020-2025 - Ricardo L. Olsen
22

33
# ACCESS VIA WEB BROWSER AT http://127.0.0.1/
4-
# Server must have tcp port 80 free!
4+
# Server must have tcp ports 80, 8080, 3000, 20000, 27017, 5432, 2404, 4840, 10001 free!
55
# Must be online to connect to IEC60870-5-104 live demo server at 207.180.242.96:2404.
66

77
services:
@@ -329,32 +329,59 @@ services:
329329
networks:
330330
- jsdemo_net
331331

332-
# Dnp3 client: requires wine as it is currently Windows-only
333-
dnp3_client_wine:
334-
image: scottyhardy/docker-wine:latest
335-
container_name: jsdemo_dnp3_client_wine
336-
#dpkg --add-architecture i386 && apt update && apt install -y xvfb wget libfreetype6 wine wine32:i386 && cd /root &&
337-
#apt update && apt install -y xvfb wget libfreetype6 wine && cd /root &&
338-
command: sh -c "export DISPLAY=:0.0 &&
339-
export WINEDEBUG=-all &&
340-
rm -rf /tmp/.X0-lock && (Xvfb :0 -screen 0 1024x768x16 &) &&
341-
cd /tmp &&
342-
wget -nc https://download.visualstudio.microsoft.com/download/pr/3c01bbe6-a49d-468f-8335-f195588f582f/b935469e8480e611eae4d79b2e51965e/dotnet-runtime-6.0.33-win-x64.exe ;
343-
wget -nc https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks ;
344-
sh ./winetricks win10 &&
345-
wine dotnet-runtime-6.0.33-win-x64.exe /q &&
346-
cd /jsonscada_bin &&
347-
sleep 40 &&
348-
wine Dnp3Client.exe "
349-
restart: unless-stopped
350-
volumes:
351-
- ./conf:/conf
352-
- ./bin_win:/jsonscada_bin
353-
- ./log:/log
354-
links:
355-
- jsdemo_mongorsn1
356-
networks:
357-
- jsdemo_net
332+
# # Dnp3 client: requires wine as it is currently Windows-only
333+
# dnp3_client_wine:
334+
# image: scottyhardy/docker-wine:latest
335+
# container_name: jsdemo_dnp3_client_wine
336+
# #dpkg --add-architecture i386 && apt update && apt install -y xvfb wget libfreetype6 wine wine32:i386 && cd /root &&
337+
# #apt update && apt install -y xvfb wget libfreetype6 wine && cd /root &&
338+
# command: sh -c "export DISPLAY=:0.0 &&
339+
# export WINEDEBUG=-all &&
340+
# rm -rf /tmp/.X0-lock && (Xvfb :0 -screen 0 1024x768x16 &) &&
341+
# cd /tmp &&
342+
# wget -nc https://download.visualstudio.microsoft.com/download/pr/3c01bbe6-a49d-468f-8335-f195588f582f/b935469e8480e611eae4d79b2e51965e/dotnet-runtime-6.0.33-win-x64.exe ;
343+
# wget -nc https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks ;
344+
# sh ./winetricks win10 &&
345+
# wine dotnet-runtime-6.0.33-win-x64.exe /q &&
346+
# cd /jsonscada_bin &&
347+
# sleep 40 &&
348+
# wine Dnp3Client.exe "
349+
# restart: unless-stopped
350+
# volumes:
351+
# - ./conf:/conf
352+
# - ./bin_win:/jsonscada_bin
353+
# - ./log:/log
354+
# links:
355+
# - jsdemo_mongorsn1
356+
# networks:
357+
# - jsdemo_net
358+
#
359+
# # OPC-DA client: requires wine as it is currently Windows-only
360+
# opcda_client_wine:
361+
# image: scottyhardy/docker-wine:latest
362+
# container_name: jsdemo_opcda_client_wine
363+
# #dpkg --add-architecture i386 && apt update && apt install -y xvfb wget libfreetype6 wine wine32:i386 && cd /root &&
364+
# #apt update && apt install -y xvfb wget libfreetype6 wine && cd /root &&
365+
# command: sh -c "export DISPLAY=:0.0 &&
366+
# export WINEDEBUG=-all &&
367+
# rm -rf /tmp/.X0-lock && (Xvfb :0 -screen 0 1024x768x16 &) &&
368+
# cd /tmp &&
369+
# wget -nc https://download.visualstudio.microsoft.com/download/pr/3c01bbe6-a49d-468f-8335-f195588f582f/b935469e8480e611eae4d79b2e51965e/dotnet-runtime-6.0.33-win-x64.exe ;
370+
# wget -nc https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks ;
371+
# sh ./winetricks win10 &&
372+
# wine dotnet-runtime-6.0.33-win-x64.exe /q &&
373+
# cd /jsonscada_bin &&
374+
# sleep 40 &&
375+
# wine OPC-DA-Client.exe "
376+
# restart: unless-stopped
377+
# volumes:
378+
# - ./conf:/conf
379+
# - ./bin_win:/jsonscada_bin
380+
# - ./log:/log
381+
# links:
382+
# - jsdemo_mongorsn1
383+
# networks:
384+
# - jsdemo_net
358385

359386
# DNP3 SERVER, demo config accepts connection on 127.0.0.1:20000 (local address 2, remote address 1)
360387
dnp3server:
@@ -378,33 +405,6 @@ services:
378405
networks:
379406
- jsdemo_net
380407

381-
# OPC-DA client: requires wine as it is currently Windows-only
382-
opcda_client_wine:
383-
image: scottyhardy/docker-wine:latest
384-
container_name: jsdemo_opcda_client_wine
385-
#dpkg --add-architecture i386 && apt update && apt install -y xvfb wget libfreetype6 wine wine32:i386 && cd /root &&
386-
#apt update && apt install -y xvfb wget libfreetype6 wine && cd /root &&
387-
command: sh -c "export DISPLAY=:0.0 &&
388-
export WINEDEBUG=-all &&
389-
rm -rf /tmp/.X0-lock && (Xvfb :0 -screen 0 1024x768x16 &) &&
390-
cd /tmp &&
391-
wget -nc https://download.visualstudio.microsoft.com/download/pr/3c01bbe6-a49d-468f-8335-f195588f582f/b935469e8480e611eae4d79b2e51965e/dotnet-runtime-6.0.33-win-x64.exe ;
392-
wget -nc https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks ;
393-
sh ./winetricks win10 &&
394-
wine dotnet-runtime-6.0.33-win-x64.exe /q &&
395-
cd /jsonscada_bin &&
396-
sleep 40 &&
397-
wine OPC-DA-Client.exe "
398-
restart: unless-stopped
399-
volumes:
400-
- ./conf:/conf
401-
- ./bin_win:/jsonscada_bin
402-
- ./log:/log
403-
links:
404-
- jsdemo_mongorsn1
405-
networks:
406-
- jsdemo_net
407-
408408
telegraf_listener:
409409
image: node:20-alpine
410410
container_name: jsdemo_telegraf_listener

0 commit comments

Comments
 (0)