Create a custom docker image and a local registry
Mein Dockerfile:
FROM debian:12
# Setze Umgebungsvariable für Nicht-Interaktivität während der Installation
ENV DEBIAN_FRONTEND noninteractive
# Aktualisiere Paketlisten und installiere grundlegende Tools
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
openssh-client \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# Installiere Node.js
ENV NODE_MAJOR=18
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
apt-get install -y nodejs
Build
docker build -t nodebuilder:latest -f nodebuilder.docker .
Push to local registry
docker push localhost:5000/nodebuilder:latest