LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Closed Thread
  Search this Thread
Old 03-14-2024, 06:49 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 565

Rep: Reputation: 10
Post Docker compose


Hello,
I have some questions about the docker compose:

1- In an internet article, a file called docker-compose.yaml was created to build the container. Can I create a YAML file for each container and use docker compose up -d to run it? If this is possible, how can I specify the input file?

2- I want to start a website that uses Nginx web server and PHP and JavaScript programming languages. Do I need a container for each (Nginx, PHP and JavaScript)?

3- The following configuration file creates a container using image and connects the containers using links:
Code:
version: '3.9'
services:
  web:
    image: nginx:latest
    ports:
      - '80:80'
    volumes:
      - ./src:/var/www/html/index.html
    links:
      - php-fpm
  php-fpm:
    image: php:8-fpm
Right?

4- I have created a container and now I want to make some changes in the YAML file and apply these new changes to the container. What should I do?

5- Is there a special folder for making containers? For example, the /var/www directory is for the web server.

Thank you.
 
Old 03-14-2024, 07:03 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
duplicate of https://www.linuxquestions.org/quest...on-4175734855/
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Deprecated Linux commands, Podman Compose vs. Docker Compose, and more sysadmin tips LXer Syndicated Linux News 0 07-05-2022 08:14 AM
LXer: Podman Compose or Docker Compose: Which should you use in Podman? LXer Syndicated Linux News 0 06-18-2022 04:48 PM
LXer: Setup Ruby on Rails Development environment with Docker and Docker Compose on Ubuntu LXer Syndicated Linux News 0 05-22-2019 10:42 PM
LXer: Docker Engine 1.6 Debuts Alongside Docker Registry 2.0 and Compose 1.2.0 LXer Syndicated Linux News 0 04-17-2015 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration