IGORNET wiki

... where shit is known.

Benutzer-Werkzeuge

Webseiten-Werkzeuge


entwicklung:docker

Docker image bauen

[Optional] mit -f den Namen der Dockerfile angeben.

docker build -t <tag-name> . -f <file-name>

Docker image speichern

docker save -o image.tar <username>/<app>

Docker image laden

docker load -i <path to image tar file>

.dockerignore

node_modules
npm-debug.log

Example Dockerfile

FROM node:18

# Create app directory
WORKDIR /usr/src/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./

RUN npm install
# If you are building your code for production
# RUN npm ci --omit=dev

# Bundle app source
COPY . .

EXPOSE 8080
CMD [ "node", "server.js" ]
entwicklung/docker.txt · Zuletzt geändert: von falk