-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 822 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# syntax=docker/dockerfile:1
FROM ghcr.io/imagegenius/baseimage-alpine:3.20
# set version label
ARG BUILD_DATE
ARG VERSION
ARG MOSQUITTO_VERSION
LABEL build_version="ImageGenius Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="hydazz"
RUN \
if [ -z ${MOSQUITTO_VERSION+x} ]; then \
MOSQUITTO_VERSION=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:mosquitto$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'); \
fi && \
echo "**** install packages ****" && \
apk add -U --upgrade --no-cache \
mosquitto==${MOSQUITTO_VERSION} \
mosquitto-clients==${MOSQUITTO_VERSION} && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 1883
VOLUME /config