@@ -33,29 +33,29 @@ ARG TARGETPLATFORM
33
33
ARG TARGETARCH
34
34
ARG BUILDPLATFORM
35
35
36
- RUN set -ex
37
- echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
38
- uname -a
39
- true
36
+ RUN set -ex; \
37
+ echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" ; \
38
+ uname -a; \
39
+ true
40
40
41
41
# replace `amd64` with `x86_64` for `node`
42
42
ENV ARCH=${TARGETARCH/amd64/x86_64}
43
43
ENV ARCH=${ARCH/arm64/aarch64}
44
44
45
45
# fetch static node binary
46
- RUN set -ex
47
- ver=$(node --version)
48
- ver=${ver:1} \
49
- temp_dir="$(mktemp -d)"
50
- curl -fsSL "https://github.com/containerbase/node-prebuild/releases/download/${ver}/node-${ver}-${ARCH}.tar.xz" -o ${temp_dir}/node.tar.xz
51
- bsdtar --strip 1 -C ${temp_dir} -xf ${temp_dir}/node.tar.xz
52
- cp ${temp_dir}/bin/node ./node
53
- true
46
+ RUN set -ex; \
47
+ ver=$(node --version); ver=${ver:1} \
48
+ temp_dir="$(mktemp -d)" ; \
49
+ curl -fsSL "https://github.com/containerbase/node-prebuild/releases/download/${ver}/node-${ver}-${ARCH}.tar.xz" -o ${temp_dir}/node.tar.xz; \
50
+ bsdtar --strip 1 -C ${temp_dir} -xf ${temp_dir}/node.tar.xz; \
51
+ cp ${temp_dir}/bin/node ./node; \
52
+ true
54
53
55
54
# fetch npm packages
56
55
ENV CI=1 npm_config_modules_cache_max_age=0 \
57
56
npm_config_loglevel=info
58
57
58
+
59
59
# replace `amd64` with `x64` for `node`
60
60
ENV ARCH=${TARGETARCH/amd64/x64}
61
61
@@ -66,16 +66,16 @@ COPY --link pnpm-lock.yaml ./
66
66
ENV npm_config_arch=${ARCH} npm_config_platform_arch=${ARCH}
67
67
68
68
# only fetch deps from lockfile https://pnpm.io/cli/fetch
69
- RUN set -ex
70
- corepack pnpm fetch --prod
71
- true
69
+ RUN set -ex; \
70
+ corepack pnpm fetch --prod; \
71
+ true
72
72
73
73
COPY --link . ./
74
74
75
75
# install npm packages
76
- RUN set -ex
77
- corepack pnpm install --prod --offline --ignore-scripts
78
- true
76
+ RUN set -ex; \
77
+ corepack pnpm install --prod --offline --ignore-scripts; \
78
+ true
79
79
80
80
# --------------------------------------
81
81
# final image
@@ -101,15 +101,15 @@ COPY --link --from=build --chown=root:root /usr/local/renovate/ /usr/local/renov
101
101
RUN ln -sf /usr/local/renovate/node /bin/node
102
102
103
103
# ensure default base and cache directories exist.
104
- RUN mkdir -p /tmp/renovate/cache &&
104
+ RUN mkdir -p /tmp/renovate/cache && \
105
105
chmod -R 777 /tmp/renovate
106
106
107
107
# test
108
- RUN set -ex
109
- renovate --version
110
- pushd /usr/local/renovate/
111
- node -e "new require('re2')('.*').exec('test');new require('better-sqlite3')(':memory:')"
112
- true
108
+ RUN set -ex; \
109
+ renovate --version; \
110
+ pushd /usr/local/renovate/; \
111
+ node -e "new require('re2')('.*').exec('test');new require('better-sqlite3')(':memory:')" ; \
112
+ true
113
113
114
114
LABEL \
115
115
org.opencontainers.image.version="${RENOVATE_VERSION}" \
0 commit comments