You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Repository dedicated to DevOps with Docker, providing configurations, Dockerfiles, and related resources to build, containerize, deploy, and manage applications in a consistent and reproducible way.
Step 1 : pull an ubuntu image from docker hub and create a container
docker pull ubuntu
docker run -it ubuntu
Step 2 : Make your own image...create a dockerfile to create a nodejs image
FROM node:20-alpine
WORKDIR /app
COPY . .
CMD node hello.js
Step 3 : build the image
docker build -t mynodeapp .
Step 4 : run the container
docker run mynodeapp
step 5 : Run in with -it flags and shell access
docker run -it mynodeapp sh
Create a non root user and run the container with that user
RUN addgroup devgroup && adduser -S -G devgroup devuser
USER devuser
About
Repository dedicated to DevOps with Docker, providing configurations, Dockerfiles, and related resources to build, containerize, deploy, and manage applications in a consistent and reproducible way.