I need to run both mosquitto and mongodb in a docker container, so I wrote this docker file
# Set the base image to Ubuntu
FROM ubuntu
RUN apt update -y && apt upgrade -y
# Install MongoDB package (.deb)
RUN apt install -y mongodb mosquitto
# Create the default data directory
RUN mkdir -p /data/db
# Expose the default port
EXPOSE 27017 1883
ENTRYPOINT mosquitto -v && mongod --bind_ip 0.0.0.0
but by doing that only mosquitto runs. If I set as entrypoint only mosquitto or only mongodb it works and I can even have access from the external, but I can't have both running in the same container. Is there a way to do that?