Docker

Aus Zovis Wikili
Wechseln zu: Navigation, Suche

get in to a Docker

docker exec -it [mycontainer or ID] sh

Dockerfile

```Dockerfile
# Base image to build layer on top
FROM node:18-alpine

# Working directory for build and runtime
WORKDIR /app

# Copy from "build context" into container image
COPY . .

# Run command during build time
RUN npm install

# Instructions what to run when container starts
CMD ["node", "src/index.js"]