Multiple docker images/container in a single repository/project using gitlab-ci.yml and without using docker-compose

I have an existing docker repo/project which creates a single image & a container via gitlab-ci.yml. Existing container contains 3 different pipelines. I need to split the container into 3 unique containers (one for each pipeline). I do not want to use docker-compose or dind. Can someone suggest an example on how can this be achieved? I believe it has to be via 3 different dockerfiles. Any references or examples will be helpful. Thank you all.

Source: StackOverflow