Skip to content

Instantly share code, notes, and snippets.

@juranki
Last active December 25, 2015 05:49
Show Gist options
  • Save juranki/6927222 to your computer and use it in GitHub Desktop.
Save juranki/6927222 to your computer and use it in GitHub Desktop.
#!/bin/bash
cp /mnt/host/sources.list /etc/apt/sources.list
apt-get update
apt-get -y upgrade
apt-get -y install build-essential cmake libssl-dev checkinstall
cd /usr/local/src
tar xzf /mnt/host/mosquitto-1.2.1.tar.gz
cd mosquitto-1.2.1
cmake .
checkinstall -y
cp *.deb /mnt/host
#!/bin/bash
docker run -v `pwd`:/mnt/host raring:latest /mnt/host/build.sh
#!/bin/bash
docker build -t juhani/mosquitto:1.2.1 .
FROM raring:latest
ADD sources.list /etc/apt/sources.list
RUN apt-get update ; apt-get -y upgrade
ADD mosquitto_1.2.1-1_amd64.deb /
RUN dpkg -i mosquitto_1.2.1-1_amd64.deb
ADD mosquitto.conf /usr/local/etc/mosquitto/mosquitto.conf
EXPOSE 1883 8883
ENTRYPOINT ["/usr/local/sbin/mosquitto", "-c", "/usr/local/etc/mosquitto/mosquitto.conf"]
#!/bin/bash
docker run juhani/mosquitto:1.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment