Docker Community Forums

Share and learn in the Docker community.

[solved] Docker compose file not starting up

(Insaneyogi) #1


Trying to start a bunch of services (mongo, mqtt & nodered) in my docker compose, but I am not able to , can anybody point out why? Here is my docker-compose.yml in entirety.

FROM ubuntu

apt-key adv --keyserver hkp:// --recv 7F0CEB10 &&
echo ‘deb dist 10gen’ |
sudo tee /etc/apt/sources.list.d/mongodb.list &&
apt-get update &&
apt-get install -y mongodb-org

VOLUME ["/data/db"]

EXPOSE 27017

CMD [“mongod”]

RUN apt-get update && apt-get install -y wget &&
wget -q -O - | apt-
key add - && \

wget -q -O /etc/apt/sources.list.d/mosquitto-jessie.list https://repo.mosqui && \
    apt-get update && apt-get install -y mosquitto && \
    adduser --system --disabled-password --disabled-login mosquitto

RUN mkdir -p /mqtt/config /mqtt/data /mqtt/log
COPY config /mqtt/config
RUN chown -R mosquitto:mosquitto /mqtt
VOLUME ["/mqtt/config", “/mqtt/data”, “/mqtt/log”]

EXPOSE 1883 9001
CMD /usr/sbin/mosquitto -c /mqtt/config/mosquitto.conf

RUN npm install -g node-red

VOLUME /root/.node-red


CMD /usr/local/bin/node-red

(Alexander Puzynia) #2

This looks like Dockerfile not a docker-compose.yml.
Rename it to Dockerfile and run

docker build .