-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
23 lines (17 loc) · 847 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.8.3
MAINTAINER John Cardenas <[email protected]>
ARG VERSION="1.8.0"
ENV MQTT_HOST=localhost:1883 \
MQTT_USERNAME=none \
MQTT_PASSWORD=none \
MQTT_CLIENT_ID=happy-bubbles-presence-detector
WORKDIR /go/src/app
RUN apt-get update && apt-get install -y --no-install-recommends wget unzip git \
&& wget https://github.com/happy-bubbles/presence/archive/${VERSION}.zip -O /tmp/presence.zip \
&& unzip /tmp/presence.zip -d /tmp/presence && rm /tmp/presence.zip \
&& cp -rf /tmp/presence/presence-${VERSION}/* . && rm -rf /tmp/presence \
&& rm -rf /var/lib/apt/lists/*
RUN go-wrapper download
RUN go-wrapper install
EXPOSE 5555
CMD go-wrapper run -http_host_path=0.0.0.0:5555 -mqtt_host=${MQTT_HOST} -mqtt_username=${MQTT_USERNAME} -mqtt_password=${MQTT_PASSWORD} -mqtt_client_id=${MQTT_CLIENT_ID}