title: How to build an image of a project using docker-compose with Dockerfile?
body: <p>I have a project that is running in local development using <a href="https://docs.docker.com/compose/" rel="nofollow noreferrer"><code>docker-compose</code></a></p>
  
  <p>As part of the organisation requirements for gitlab and deployment, the application needs to be built into a single Docker image.</p>
  
  <p>I understand this can be done by adding a <a href="https://docs.docker.com/engine/reference/builder/" rel="nofollow noreferrer"><code>Dockerfile</code></a> to the project.</p>
  
  <p>However, I'm wondering if any advice or suggestions on how to include a project running multiple services via <code>docker-compose</code> with the application codebase into a single image with <code>Dockerfile</code> for deployment, thanks.</p>
  
  <p>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 <code>docker-compose.yml</code> file for the deployment environment?</p>
  
  <p>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.</p>