Skip to content

Commit a5cfebe

Browse files
committed
20210917 Mosquitto - experimental branch - PR 3 of 3
A problem affecting the build of the Mosquitto container keeps showing up in Discord questions. Examples: * [2021-09-17](https://discord.com/channels/638610460567928832/638610461109256194/888096248761045022) * [2021-09-09](https://discord.com/channels/638610460567928832/638610461109256194/885494986710335498) The problem is discussed in [alpinelinux/docker-alpine issues/98](alpinelinux/docker-alpine#98). It is not clear whether: 1. The problem is transient (ie those reporting it are able to get past the problem on a retry); 2. Only affects Mosquitto or potentially affects other Alpine-based IOTstack containers using `apk` to add packages (eg Node-RED); or 3. Environmental (eg if there is a proxy system between the Raspberry Pi and dl-cdn.alpinelinux.org). This Pull Request is implementing the patch suggested by Issue 98 of reverting `apk` requests to use HTTP. Given the march towards HTTPS-everywhere, reverting to HTTP might seem inadvisable but: * Issue 98 was opened in July 2020. * There seems to have been no significant progress towards its resolution since January 2021. * The Discord traffic suggests it is an ongoing and present issue for IOTstack users. Also harmonises Mosquitto Dockerfile on experimental branch with the common versions on master and old-menu branches.
1 parent 3ab3adf commit a5cfebe

File tree

1 file changed

+5
-2
lines changed
  • .internal/templates/services/mosquitto/buildFiles

1 file changed

+5
-2
lines changed

.internal/templates/services/mosquitto/buildFiles/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Download base image
22
FROM eclipse-mosquitto:latest
33

4+
# see https://github.com/alpinelinux/docker-alpine/issues/98
5+
RUN sed -i 's/https/http/' /etc/apk/repositories
6+
47
# Add support tools
58
RUN apk update && apk add --no-cache rsync tzdata
69

710
# where IOTstack template files are stored
8-
ENV MOSQUITTO_IOTSTACK_DEFAULTS="/iotstack_defaults"
11+
ENV IOTSTACK_DEFAULTS_DIR="iotstack_defaults"
912

1013
# copy template files to image
11-
COPY --chown=mosquitto:mosquitto . /${MOSQUITTO_IOTSTACK_DEFAULTS}
14+
COPY --chown=mosquitto:mosquitto ${IOTSTACK_DEFAULTS_DIR} /${IOTSTACK_DEFAULTS_DIR}
1215

1316
# replace the docker entry-point script
1417
ENV IOTSTACK_ENTRY_POINT="docker-entrypoint.sh"

0 commit comments

Comments
 (0)