Skip to content

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.

Notifications You must be signed in to change notification settings

ibraum/devops-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Devops

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published