Docker: Unterschied zwischen den Versionen

Aus Zovis Wikili
Wechseln zu: Navigation, Suche
(get in to a Docker)
(Dockerfile)
Zeile 3: Zeile 3:
 
  docker exec -it [mycontainer or ID] sh
 
  docker exec -it [mycontainer or ID] sh
  
= Dockerfile =
+
= Dockerfile Basic Syntax =
 
<pre>
 
<pre>
 
```Dockerfile
 
```Dockerfile

Version vom 26. Mai 2026, 12:20 Uhr

get in to a Docker

docker exec -it [mycontainer or ID] sh

Dockerfile Basic Syntax

```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"]