@@ -155,35 +155,34 @@ RUN sed -i -r "/^(root|nobody)/!d" /etc/passwd /etc/shadow /etc/group \
155155# - IOTA_AUTH_USER, IOTA_AUTH_PASSWORD - when using Keystone Security
156156# - IOTA_AUTH_CLIENT_ID, IOTA_AUTH_CLIENT_SECRET - when using OAuth2 Security
157157#
158- # FIXME: distroless stuff disabled. See https://github.com/telefonicaid/iotagent-json/issues/891
159- #
160158# #######################################################################################
161- # FROM gcr.io/distroless/nodejs:${NODE_VERSION} AS distroless
162- # ARG GITHUB_ACCOUNT
163- # ARG GITHUB_REPOSITORY
164- # ARG NODE_VERSION
165- #
166- # LABEL "maintainer"="FIWARE IoTAgent Team. Telefónica I+D"
167- # LABEL "org.opencontainers.image.authors"="iot_support@tid.es"
168- # LABEL "org.opencontainers.image.documentation"="https://github.com/telefonicaid/iotagent-manager/blob/master/README.md"
169- # LABEL "org.opencontainers.image.vendor"="Telefónica Investigación y Desarrollo, S.A.U"
170- # LABEL "org.opencontainers.image.licenses"="AGPL-3.0-only"
171- # LABEL "org.opencontainers.image.title"="FIWARE IoT Agent Manager (Distroless)"
172- # LABEL "org.opencontainers.image.description"="The IoT Agent Manager works as a proxy for scenarios where multiple IoT Agents offer different southbound protocols. The IoTA Manager appears as a single administration endpoint for provisioning tasks, redirecting provisioning requests to the appropriate IoTAgent based on the declared protocol."
173- # LABEL "org.opencontainers.image.source"="https://github.com/${GITHUB_ACCOUNT}/${GITHUB_REPOSITORY}"
174- # LABEL "org.nodejs.version"="${NODE_VERSION}"
175- #
176- # COPY --from=builder /opt/iotaManager /opt/iotaManager
177- # COPY --from=anon-user /etc/passwd /etc/shadow /etc/group /etc/
178- # WORKDIR /opt/iotaManager
179- #
180- # USER nobody
181- # ENV NODE_ENV=production
182- # # Expose 8082 for IOTA_SERVER_PORT
183- # EXPOSE ${IOTA_SERVER_PORT:-8082}
184- # CMD ["./bin/iota-manager", "-- ", "config.js"]
185- # HEALTHCHECK --interval=30s --timeout=3s --start-period=10s \
186- # CMD ["/nodejs/bin/node", "./bin/healthcheck"]
159+ # hadolint ignore=DL3006,DL3007
160+ FROM gcr.io/distroless/nodejs${NODE_VERSION}-debian12 AS distroless
161+ ARG GITHUB_ACCOUNT
162+ ARG GITHUB_REPOSITORY
163+ ARG NODE_VERSION
164+
165+ LABEL "maintainer" ="FIWARE IoTAgent Team. Telefónica I+D"
166+ LABEL "org.opencontainers.image.authors" ="iot_support@tid.es"
167+ LABEL "org.opencontainers.image.documentation" ="https://github.com/telefonicaid/iotagent-manager/blob/master/README.md"
168+ LABEL "org.opencontainers.image.vendor" ="Telefónica Investigación y Desarrollo, S.A.U"
169+ LABEL "org.opencontainers.image.licenses" ="AGPL-3.0-only"
170+ LABEL "org.opencontainers.image.title" ="FIWARE IoT Agent Manager (Distroless)"
171+ LABEL "org.opencontainers.image.description" ="The IoT Agent Manager works as a proxy for scenarios where multiple IoT Agents offer different southbound protocols. The IoTA Manager appears as a single administration endpoint for provisioning tasks, redirecting provisioning requests to the appropriate IoTAgent based on the declared protocol."
172+ LABEL "org.opencontainers.image.source" ="https://github.com/${GITHUB_ACCOUNT}/${GITHUB_REPOSITORY}"
173+ LABEL "org.nodejs.version" ="${NODE_VERSION}"
174+
175+ COPY --from=builder /opt/iotaManager /opt/iotaManager
176+ COPY --from=anon-user /etc/passwd /etc/shadow /etc/group /etc/
177+ WORKDIR /opt/iotaManager
178+
179+ USER nobody
180+ ENV NODE_ENV=production
181+ # Expose 8082 for IOTA_SERVER_PORT
182+ EXPOSE ${IOTA_SERVER_PORT:-8082}
183+ CMD ["./bin/iota-manager" , "-- " , "config.js" ]
184+ HEALTHCHECK --interval=30s --timeout=3s --start-period=10s \
185+ CMD ["/nodejs/bin/node" , "./bin/healthcheck" ]
187186
188187
189188# #######################################################################################
0 commit comments