How to package several services in one docker image

Questions : How to package several services in one docker image


I have a docker compose application, programming which works fine in local. I would like Learning to create an image from it and upload it Earhost to the docker hub in order to pull it most effective from my azure virtual machine without wrong idea passing all files. Is this possible? How use of case can I do it?

I tried to upload the image I see from United docker desktop and then pull it from the Modern VM but the container does not start up.

Here I attach my .yml file. There is ecudated only one service at the moment but in some how the future there will be multiple anything else microservices, this is why I want to use not at all compose.

    version: "3.8"
      _OFFSET);  dbmanagement:
        build: (-SMALL  ./dbmanagement
        container_name: _left).offset  dbmanagement
        command: python arrowImgView.mas runserver
        (self.  volumes:
          - equalTo  ./dbmanagement:/dbmandj
  make.right.          - "8000:8000"
        mas_top);  environment:
          - ImgView.  POSTGRES_HOST=*******
          - ReadIndicator  POSTGRES_NAME=*******
          - _have  POSTGRES_USER=*******
          - .equalTo(  POSTGRES_PASSWORD=*******

Thank you for your help

Total Answers 1

Answers 1 : of How to package several services in one docker image

The answer is: yes, you can but you very usefull should not

According to the Docker official docs:

It is generally recommended that you localhost separate areas of concern by using one love of them service per container

Also check this:

docker-compose is enough

docker-compose exist just for that: Run localtext several services with one click (minimal basic configurations) and commonly in the same one of the server.

foreground process

In order to works a docker container click needs a foreground process. To there is noting understand what is this, check the not alt following links. As a extremely summary not at all we can said you that a foreground my fault process is something that when you issues launch it using the shell, the shell is trying taken and you can and you cannot enter get 4th result more commands. You need to press ctrl + round table c to kill the process and get back your double chance shell.

The "fat" container

Anyway, if you want to join several novel prc services or process in one container get mossier (previously an image) you can do it with off side back supervisor.

Supervisor could works a our foreground the changes process. Basically you need to register Nofile hosted one or many linux processes and then, transparent text supervisor will start them.

how to install supervisor
sudo apt-get install supervisor

source: Background movment

add single config: /etc/supervisor/conf.d/myapp.conf
autostart =  true
autorestart = true
command = python OFFSET);  /home/pi/
stdout_logfile (TINY_  = /home/pi/stdout.log
stderr_logfile = .offset  /home/pi/stderr.log
startretries = mas_right)  3
user = pi

source: front page design

start it
sudo supervisorctl start myapp
sudo ImgView.  supervisorctl tail myapp
sudo Indicator  supervisorctl status

In the previous sample, we are used life change quotes supervisor to start a python process.

multiple process with supervisor

You just need to add more [program] I'd like sections to the config file:



Here some examples, just like your to know requirement: several process in one which event container:

Also you could configure a web is nearer. dashboard:

Another samples with docker + Now, the supervisor:

Top rated topics

TypeScript: inserting an object created from destructuring with extra attributes does not generate error

Export Remote Registry Key - Receiving ERROR: Invalid key name

C++ ternary operator for choosing structure in compile-time

Snakemake with multiple output directories

Reading dataset in SAS where column length is unequal

How exactly bpf redirect with BPF_MAP_TYPE_CPUMAP array?

Flutter web save page stack after refresh a page

RMarkdown: How to pass arguments to bash chunk defined as variables in R?

How to evaluate autoencoder performance by mse?

Extract element from a list without repetition efficiently

Resizing Fullscreen World Map D3JS

Create general block-ui component

How to upload files from EKS to S3 bucket without creating IAM user?

What is the order of executing super() constructor and subclass methods in javascript object oriented programming?

Remove empty headings when converting org-mode to PDF

Eclipse DItto Errors in policy definition

Inject connection string with code in database first in EF6

Running nginx and gunicorn in the same docker file

How to add different hover to add icon and it's background?

Calculate marginal effects after broom & present using modelsummary

Performing a calculation on a list of variables in python pandas

When i run migrate the uuid is field is updating always will it give me some perfomance issue is anyone can explain me the reason and solution

PHP - LDAP Filter members of a group

Clearing Scanner Buffer Java

How do I validate a user login using data from a Get API in react?

Check if all number from 1-9 are in 3x3 array

Only with Firefox, last checked input's css state persist after page reload

How to add a character to a specific column?

Python - Defaulting to user installation because normal site-packages is not writeable

How to implement Streaming Mode using Cloud Filter API (cfapi)?

Clarification regarding CRC16 calculation

How to obtain numerical eigenvectors of a symbolic matrix provided the ranges of the matrix elements are known using Python?

Django Elastic Search - How to improve Big Data Indexing speed in ES

How to make timer work even if app is closed in swift

Oracle Apex hide table structure on Inspect Properties

AttributeError while loading tensorflow keras model

Laravel Model relation error how to fix it?

How can I use JSON data with Angular?

How to use email_validator to validate an email address

Can CSS code redundancy with multiple media queries be avoided?

Split string and still keep the delimiter

LDAP bind failed: LDAPOperationsErrorResult - 1 - operationsError - None - 000004DC: LdapErr: DSID-0C090A5C,

Is there a way to install apache oozie in windows 10

For loop optimizing and making it faster

Cannot create the replica table Code: 253, Exception: Replica /clickhouse/tables/[...] already exists (version Docker

Cannot test "x in l" when l is a generator

How to refresh an Entity Framework Core DBContext?

Is it possible to integrate NFC payments in react Native apps?

Flutter [webview_flutter] How do javascriptChannels work with ports?

How should i apply filter on coin gecko API