I have a project that is running in local development using docker-compose
As part of the organisation requirements for gitlab and deployment, the application needs to be built into a single Docker image.
I understand this can be done by adding a Dockerfile
to the project.
However, I'm wondering if any advice or suggestions on how to include a project running multiple services via docker-compose
with the application codebase into a single image with Dockerfile
for deployment, thanks.
EDIT: From what I can gather, the approach would be to build a new image , with Dockerfile, from the application codebase, then include that in the docker-compose.yml
file for the deployment environment?
EDIT 2: Apologies for the confusion. I'm new at Docker and there's a bit of learning curve! In this case it seems one can build the application image in the gitlab registry and then include that image in the docker-compose for deployment, will try it.