TL;DR

A single Dockerfile is usually not enough to replace a whole containers orchestration made with docker-compose and is not necessarly a good choice.

About converting a docker-compose.yml file to a Dockerfile :

You can pass some informations from your docker-compose.yml file to your Dockefile (the command to run for instance) but that wouldn't be equivalent and you can't do that with all the docker-compose.yml file content.

You can replace your docker-compose.yml file with commands lines though (as docker-compose is precisely to replace it).


BUT

Keep in mind that Dockerfiles and docker-compose serve two whole different purposes.

So asking to "convert a docker-compose.yml file into a Dockerfile" isn't really relevant.

That's more about converting a docker-compose.yml file into one (or several) command line(s) to start containers by hand.

The purpose of docker-compose is precisely to get rid of these command lines to make things simpler (it automates it).

Multiple processes in a single container :

From the docker documentation :

It’s ok to have multiple processes, but to get the most benefit out of Docker, avoid one container being responsible for multiple aspects of your overall application

So you can if your entrypoint permits you to launch several processes, or if you use a supervisor, but maybe that's not necessarly the best idea.

EDIT

Since I'm not sure it's clear for you either, here is the difference between a container and an image.

You really should check this out and try to understand this before working with Docker since it's a very necessary thing to know.