OPERATING SYSTEMSOS Linux

🐳How to install docker compose and run Basic Container in 1 MINUTE!🐧 #shorts #devops #docker #linux

🐳How to install docker compose and run Basic Container in 1 MINUTE!🐧 #shorts #devops #docker #linux

In this video, we’ll guide you through streamlining your development workflow using Docker Compose. You’ll learn how to quickly update your system, install Docker Compose, and get a basic Nginx container up and running in no time.

Here’s what you’ll discover:

Keeping your system up-to-date with essential package updates.
Installing Docker Compose, a powerful tool for managing multi-container applications.
Building a simple Docker Compose file to define your Nginx container configuration.
Running the container and exposing it to your local machine.
Configuring your firewall to allow access to the container’s port.
By the end of this video, you’ll have a solid foundation for using Docker Compose to manage and deploy your applications with ease.

Tags: docker, docker-compose, nginx, containerization, development, automation, workflow

============

let’s update all packages

and run command sudo yum install

“`
sudo yum update -y
sudo yum install docker-compose-plugin -y
docker compose version
“`

now we can check docker compose by runnin docker compose version

or crease simple compose file

https://github.com/docker/awesome-compose

“`jsx
vi docker-compose-file.yml
“`

“`jsx
services:
client:
image: nginx
ports:
– 8080:80
volumes:
– ./src:/usr/share/nginx/html
“`

and run it with commans

docker compose build

and docker compose up

“`jsx
docker compose -f docker-compose-file.yml build
docker compose -f docker-compose-file.yml up -d
docker ps -a
“`

“`jsx
sudo firewall-cmd –zone=public –add-port=8080/tcp –permanent
sudo firewall-cmd –reload

“`

source

by Piotr Kubon DevOps

linux foundation

5 thoughts on “🐳How to install docker compose and run Basic Container in 1 MINUTE!🐧 #shorts #devops #docker #linux

Comments are closed.