Pulling Flask application image repository from Docker.com: Are configuration files not pulled?

0

While pulling an image from Docker.com repository of a Flask application to a Ubuntu Amazon Lightsail instance, is it still needed to add configuration files (Dockerfile, config.ini, requirements.txt, docker-compose.yml..) using commands such as nano on the Amazon CLI? Or are they pulled together with app.py and other core files (such as index.html)?

profile picture
asked 7 months ago328 views
1 Answer
0

Hello.

If the container image pushed to DockerHub was built on your local PC, you can pull the same container that was running on your local PC.
In other words, if the container contains app.py etc. and is pushed to DockerHub, you can use the same container whether it is Lightsail or EC2.
When you pull a Docker image into your Lightsail instance, the image contains everything needed to run your application, including your application code (app.py) and any dependencies and configurations specified when the image was built.
Therefore, if the configuration files necessary to run the application are already included when creating the image, there is no need to manually add app.py etc. to the instance.

profile picture
EXPERT
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions