Skip to content

Commit

Permalink
Use non-nodejs base image (#384)
Browse files Browse the repository at this point in the history
  • Loading branch information
inverse authored Feb 9, 2024
1 parent 66ff807 commit 85100fc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"matchStringsStrategy": "any",
"matchStrings": [
"ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+",
"ARG BUILDER=(?<depName>.*?):(?<currentValue>.*?)\\s+",
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
],
"datasourceTemplate": "docker"
Expand Down
35 changes: 24 additions & 11 deletions tasmoadmin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base-nodejs:0.1.3
ARG BUILD_FROM=ghcr.io/hassio-addons/base:15.0.6
ARG BUILDER=ghcr.io/hassio-addons/base-nodejs:0.1.3

# hadolint ignore=DL3006
FROM ${BUILDER} AS builder

# Setup base
ARG TASMOADMIN_VERSION="v3.3.3"

# hadolint ignore=DL3003
RUN \
apk add --no-cache \
git=2.43.0-r0 \
\
&& git clone --branch "${TASMOADMIN_VERSION}" --depth=1 \
"https://github.com/TasmoAdmin/TasmoAdmin.git" /var/www/tasmoadmin \
\
&& cd /var/www/tasmoadmin/tasmoadmin \
&& npm ci \
&& node minify.js \
&& NODE_ENV=production npm ci

# hadolint ignore=DL3006
FROM ${BUILD_FROM}

# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Setup base
ARG TASMOADMIN_VERSION="v3.3.3"
COPY --from=builder /var/www/tasmoadmin/tasmoadmin /var/www/tasmoadmin/tasmoadmin

# hadolint ignore=DL3003
RUN \
apk add --no-cache \
Expand All @@ -23,18 +44,10 @@ RUN \
\
&& apk add --no-cache --virtual .build-dependencies \
composer=2.7.0-r0 \
git=2.43.0-r0 \
\
&& git clone --branch "${TASMOADMIN_VERSION}" --depth=1 \
"https://github.com/TasmoAdmin/TasmoAdmin.git" /var/www/tasmoadmin \
\
&& cd /var/www/tasmoadmin/tasmoadmin \
&& composer install --no-dev \
\
&& npm ci \
&& node minify.js \
&& NODE_ENV=production npm ci \
\
&& apk del --no-cache --purge .build-dependencies \
\
&& rm -f -r \
Expand Down
6 changes: 3 additions & 3 deletions tasmoadmin/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
build_from:
aarch64: ghcr.io/hassio-addons/base-nodejs:0.1.3
amd64: ghcr.io/hassio-addons/base-nodejs:0.1.3
armv7: ghcr.io/hassio-addons/base-nodejs:0.1.3
aarch64: ghcr.io/hassio-addons/base:15.0.6
amd64: ghcr.io/hassio-addons/base:15.0.6
armv7: ghcr.io/hassio-addons/base:15.0.6
codenotary:
base_image: [email protected]
signer: [email protected]

0 comments on commit 85100fc

Please sign in to comment.