Multistage build im Dockerfile von logic eingebaut. GCC, ... werden damit nicht in das finale Image kopiert.
This commit is contained in:
1 parent
a77bc1b90b
commit
65a5f65511
5 files changed
+30
-31
No files matched your search
@@ -1,4 +1,5 @@
|
||||
FROM python:3.11-slim
|
||||
#FROM python:3.11-slim
|
||||
FROM python:3.14-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
+23
-25
@@ -1,35 +1,33 @@
|
||||
# Basis-Image von Node-RED verwenden
|
||||
FROM nodered/node-red:latest
|
||||
|
||||
# Zu root wechseln, um Pakete zu installieren
|
||||
# ==========================================
|
||||
# STAGE 1: Der Builder (Hier wird kompiliert)
|
||||
# ==========================================
|
||||
FROM nodered/node-red:latest AS builder
|
||||
USER root
|
||||
|
||||
# Python und notwendige Tools installieren
|
||||
#RUN apk add --no-update python3 py3-pip
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-pip \
|
||||
python3-dev \
|
||||
gcc \
|
||||
g++ \
|
||||
musl-dev \
|
||||
libffi-dev \
|
||||
tzdata
|
||||
# Compiler installieren, die Scout bemängelt
|
||||
RUN apk add --no-cache python3 py3-pip python3-dev gcc g++ musl-dev libffi-dev
|
||||
|
||||
USER node-red
|
||||
|
||||
# Python-Pakete installieren (ldap3 separat via pip)
|
||||
RUN pip install --no-cache-dir ldap3 --break-system-packages
|
||||
|
||||
# Falls Ihre Skripte spezielle Python-Libraries brauchen (z.B. pymongo, pandas)
|
||||
# RUN pip3 install pymongo pandas --break-system-packages
|
||||
RUN pip3 install --no-cache-dir --break-system-packages \
|
||||
# Python-Pakete in einen separaten Ordner installieren
|
||||
RUN pip3 install --no-cache-dir --break-system-packages --target=/var/tmp/python-packages \
|
||||
pandas \
|
||||
numpy \
|
||||
ldap3
|
||||
|
||||
# Zurück zum Node-RED User für die Sicherheit
|
||||
# ================================================
|
||||
# STAGE 2: Das finale, saubere Image
|
||||
# gcc, ... wird nicht in das finale Image kopiert.
|
||||
# ================================================
|
||||
FROM nodered/node-red:latest
|
||||
USER root
|
||||
|
||||
# NUR die Laufzeitumgebung installieren (KEIN gcc, KEIN g++, KEIN musl-dev!)
|
||||
RUN apk add --no-cache python3 py3-pip tzdata
|
||||
|
||||
# Die fertig kompilierten Pakete aus Stage 1 rüberkopieren
|
||||
COPY --from=builder /var/tmp/python-packages /usr/lib/python3.11/site-packages
|
||||
|
||||
# Zurück zum sicheren Standard-User von Node-RED
|
||||
USER node-red
|
||||
|
||||
# Installiere zusaetzliche Node-RED Module (moment fuer Zeitzonen, cron-plus fuer erweiterte Zeitsteuerung)
|
||||
# Node-RED Module installieren
|
||||
RUN npm install node-red-contrib-moment node-red-contrib-cron-plus
|
||||
@@ -27,7 +27,7 @@
|
||||
"v": 4,
|
||||
"tabs": [],
|
||||
"primary": {
|
||||
"width": 304,
|
||||
"width": 280,
|
||||
"top": {
|
||||
"tabs": [
|
||||
"info",
|
||||
@@ -35,7 +35,7 @@
|
||||
"config",
|
||||
"context"
|
||||
],
|
||||
"height": 466,
|
||||
"height": 468,
|
||||
"hidden": false,
|
||||
"active": "help"
|
||||
},
|
||||
@@ -53,7 +53,7 @@
|
||||
"tabs": [
|
||||
"explorer"
|
||||
],
|
||||
"height": 308,
|
||||
"height": 310,
|
||||
"hidden": false,
|
||||
"active": "explorer"
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
size_by_ownergroup_and_number_of_copies_2026-06-25T14_46_23.json
|
||||
size_by_ownergroup_and_number_of_copies_2026-06-25T14_49_44.json
|
||||
@@ -1,2 +1,2 @@
|
||||
[{"ownerGroup": "p11109", "copies": "twoCopiesBig", "size": "2.5880284547E11", "packedSize": "2.58802688E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p17362", "copies": "oneCopyBig", "size": "1.459498832574E12", "packedSize": "1.45974536192E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p11117", "copies": "twoCopiesBig", "size": "3.08848297887E11", "packedSize": "3.0884769792E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p19557", "copies": "oneCopyBig", "size": "4.2952607724E10", "packedSize": "4.295317504E10", "beamline": "X05LA", "department": "6000"}, {"ownerGroup": "p22046", "copies": "oneCopyBig", "size": "1059011317", "packedSize": "1059788800", "beamline": "gps", "department": "3000"}, {"ownerGroup": "p22658", "copies": "oneCopySmall", "size": "1990130", "packedSize": "2048000", "beamline": "DMC", "department": "3000"}, {"ownerGroup": "p22155", "copies": "oneCopyBig", "size": "536010400", "packedSize": "546304000", "beamline": "SANS-I", "department": "3000"}, {"ownerGroup": "p21818", "copies": "oneCopyBig", "size": "55582896", "packedSize": "56872960", "beamline": "HRPT", "department": "3000"}, {"ownerGroup": "p18863", "copies": "oneCopyBig", "size": "5.2705394198582E13", "packedSize": "5.27054070784E13", "beamline": "SATESE", "department": "6000"}, {"ownerGroup": "p22821", "copies": "oneCopyBig", "size": "11473790926", "packedSize": "11474718720", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p21630", "copies": "oneCopySmall", "size": "1261202", "packedSize": "1300480", "beamline": "SARESC", "department": "6000"}, {"ownerGroup": "p15944", "copies": "oneCopyBig", "size": "1.0823865732E10", "packedSize": "1.08243968E10", "beamline": "X05LA", "department": "6000"}, {"ownerGroup": "p20329", "copies": "oneCopySmall", "size": "130242", "packedSize": "143360", "beamline": "FOCUS", "department": "3000"}, {"ownerGroup": "p12926", "copies": "oneCopyBig", "size": "1.64919812404E12", "packedSize": "1.64919830528E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p11334", "copies": "twoCopiesBig", "size": "1.688862580554E12", "packedSize": "1.68886298624E12", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p21776", "copies": "oneCopyBig", "size": "465574021", "packedSize": "466483200", "beamline": "DMC", "department": "3000"}, {"ownerGroup": "p19532", "copies": "oneCopySmall", "size": "5023977", "packedSize": "5068800", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p22952", "copies": "oneCopySmall", "size": "663301", "packedSize": "880640", "beamline": "ZEBRA", "department": "3000"}, {"ownerGroup": "p22613", "copies": "oneCopySmall", "size": "43815", "packedSize": "92160", "beamline": "NARZISS", "department": "3000"}, {"ownerGroup": "p17618", "copies": "twoCopiesBig", "size": "6.76420283331E11", "packedSize": "6.7653400576E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p20586", "copies": "oneCopyBig", "size": "4.6367864573884E13", "packedSize": "4.636887020544E13", "beamline": "SARESB", "department": "6000"}, {"ownerGroup": "p17419", "copies": "twoCopiesBig", "size": "6.50031873453E11", "packedSize": "6.5003189248E11", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "a-35259", "copies": "oneCopySmall", "size": "8604", "packedSize": "20480", "department": "9000"}, {"ownerGroup": "p18736", "copies": "oneCopyBig", "size": "9.17893942636E11", "packedSize": "9.1795216384E11", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p20105", "copies": "oneCopyBig", "size": "8.43717960217E11", "packedSize": "8.437185024E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p17880", "copies": "oneCopySmall", "size": "1039594", "packedSize": "1116160", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p16651", "copies": "twoCopiesBig", "size": "7.3912603397E11", "packedSize": "7.3912605696E11", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17571", "copies": "oneCopyBig", "size": "5.6345639211248E13", "packedSize": "5.634585010176E13", "beamline": "SARESB", "department": "6000"}, {"ownerGroup": "p19319", "copies": "oneCopyBig", "size": "6.1571371681109E13", "packedSize": "6.157297104896E13", "beamline": "SARESB", "department": "6000"}, {"ownerGroup": "p18171", "copies": "oneCopySmall", "size": "759105", "packedSize": "768000", "beamline": "X09LA", "department": "6000"}, {"ownerGroup": "p22025", "copies": "oneCopyBig", "size": "1691726587", "packedSize": "1693163520", "beamline": "gps", "department": "3000"}, {"ownerGroup": "p18038", "copies": "oneCopyBig", "size": "8.036917721768E12", "packedSize": "8.0368928768E12", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p17075", "copies": "oneCopyBig", "size": "2.17243330753E11", "packedSize": "2.1725115392E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p16773", "copies": "oneCopyBig", "size": "1.562116849E10", "packedSize": "1.566789632E10", "beamline": "X11MA", "departmenLine truncated
|
||||
[{"ownerGroup": "p18419", "copies": "oneCopyBig", "size": "1.71048339017E11", "packedSize": "1.711597568E11", "beamline": "X11MA", "department": "6000"}, {"ownerGroup": "p17419", "copies": "twoCopiesBig", "size": "6.50031873453E11", "packedSize": "6.5003189248E11", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p17555", "copies": "oneCopyBig", "size": "2.155842622917E12", "packedSize": "2.15587003392E12", "beamline": "X08SA", "department": "6000"}, {"ownerGroup": "p19200", "copies": "oneCopyBig", "size": "1.1864029844886E14", "packedSize": "1.1864037650432E14", "beamline": "SARESA", "department": "6000"}, {"ownerGroup": "p18240", "copies": "oneCopyBig", "size": "1.299103842243E12", "packedSize": "1.2991615488E12", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p16471", "copies": "oneCopySmall", "size": "319939", "packedSize": "327680", "beamline": "X09LA", "department": "6000"}, {"ownerGroup": "p22164", "copies": "oneCopyBig", "size": "4309720", "packedSize": "5140480", "beamline": "ZEBRA", "department": "3000"}, {"ownerGroup": "p21060", "copies": "oneCopyBig", "size": "19084781262", "packedSize": "19085987840", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p21209", "copies": "oneCopyBig", "size": "5.569000528788E13", "packedSize": "5.569006183424E13", "beamline": "SARESA", "department": "6000"}, {"ownerGroup": "p17828", "copies": "oneCopyBig", "size": "4.45403665462E13", "packedSize": "4.454046472192E13", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p16634", "copies": "oneCopySmall", "size": "2393985", "packedSize": "2764800", "beamline": "X04DB", "department": "6000"}, {"ownerGroup": "p16738", "copies": "twoCopiesBig", "size": "2.932185502184E13", "packedSize": "2.932530755584E13", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p18905", "copies": "oneCopyBig", "size": "2.9848082645E10", "packedSize": "2.990030848E10", "beamline": "X11MA", "department": "6000"}, {"ownerGroup": "p16099", "copies": "oneCopyBig", "size": "2.45503897305E11", "packedSize": "2.455212032E11", "beamline": "X12SA", "department": "6000"}, {"ownerGroup": "p22408", "copies": "oneCopyBig", "size": "23452047236", "packedSize": "23453757440", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p22631", "copies": "oneCopyBig", "size": "1292216468", "packedSize": "1292482560", "beamline": "AMOR", "department": "3000"}, {"ownerGroup": "p18976", "copies": "oneCopyBig", "size": "589097159", "packedSize": "590120960", "beamline": "X11MA", "department": "6000"}, {"ownerGroup": "p20496", "copies": "oneCopyBig", "size": "2546068054", "packedSize": "2548992000", "beamline": "gpd", "department": "3000"}, {"ownerGroup": "p21905", "copies": "oneCopySmall", "size": "48552", "packedSize": "61440", "beamline": "CAMEA", "department": "3000"}, {"ownerGroup": "p12202", "copies": "twoCopiesBig", "size": "3.96492613255E11", "packedSize": "3.9649275904E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p22057", "copies": "oneCopyBig", "size": "18319205106", "packedSize": "18320035840", "beamline": "lem", "department": "3000"}, {"ownerGroup": "p22318", "copies": "oneCopyBig", "size": "388597565", "packedSize": "389355520", "beamline": "FOCUS", "department": "3000"}, {"ownerGroup": "p14196", "copies": "oneCopyBig", "size": "1.0357826237E10", "packedSize": "1.039229952E10", "beamline": "X11MA", "department": "6000"}, {"ownerGroup": "p18741", "copies": "oneCopySmall", "size": "7140935", "packedSize": "10434560", "beamline": "SARESA", "department": "6000"}, {"ownerGroup": "p19898", "copies": "oneCopyBig", "size": "458567543", "packedSize": "459018240", "beamline": "dolly", "department": "3000"}, {"ownerGroup": "p20566", "copies": "oneCopyBig", "size": "4.9832807703365E13", "packedSize": "4.983314065408E13", "beamline": "X06SA", "department": "6000"}, {"ownerGroup": "p22124", "copies": "oneCopyBig", "size": "134335306", "packedSize": "134420480", "beamline": "FOCUS", "department": "3000"}, {"ownerGroup": "p21923", "copies": "oneCopyBig", "size": "1652082", "packedSize": "2037760", "beamline": "EIGER", "department": "3000"}, {"ownerGroup": "p19824", "copies": "oneCopyBig", "size": "451330271", "packedSize": "451850240", "beamline": "gps", "department": "3000"}, {"ownerGroup": "p18167", "copies": "twoCopiesBig", "size": "2.08150370826E11", "packedSize": "2.0818541568E11", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p15923", "copies": "oneCopySmall", "size": "721", "packedSize": "949", "beamline": "X02DA", "department": "6000"}, {"ownerGroup": "p20507", "copies": "oneCopyBig", "size": "2129523728", "packedSize": "2130821120", "beamline": "hal-9500", "department": "3000"}, {"ownerGroup": "p18990", "copies": "oneCopyBig", "size": "701483011", "packedSize": "702259200", "beamline": "dolly", "department": "3000"}, {"ownerGroup": "p19000", "copies": "oneCopyBig", "size": "466433016", "packedSize": "467015680", "beamline": "dolly", "department": "3000"}, {"ownerGroup": "p1Line truncated
|
||||
|
||||
Reference in new issue
Block a user