File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,17 +65,21 @@ ENV REVISION ${REVISION}
6565
6666USER root
6767# iproute2, curl: generally useful network utilities that don't take much space
68- # xz-utils: needed to extract node tarball
6968# libvips43, poppler-utils: activestorage dependencies
7069# libjemalloc2: more efficient memory allocation in Ruby and Node
7170# shared-mime-info: Rails dependency
7271# libpq5: pg gem dependency
73- RUN apt-get update && apt-get install -y --no-install-recommends iproute2 curl libvips42 poppler-utils xz-utils libjemalloc2 shared-mime-info libpq5 gosu && rm -rf /var/lib/apt/lists/*
72+ # xz-utils: installed temporarily to extract the node tarball, then removed
73+ RUN apt-get update \
74+ && apt-get install -y --no-install-recommends iproute2 curl libvips42 poppler-utils xz-utils libjemalloc2 shared-mime-info libpq5 gosu \
75+ && mkdir /opt/node \
76+ && cd /opt/node \
77+ && curl https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-$(echo ${TARGETARCH} | sed 's/amd64/x64/' ).tar.xz | tar xJ --strip-components=1 \
78+ && rm -rf /opt/node/include /opt/node/lib/node_modules \
79+ && apt-get purge -y xz-utils \
80+ && apt-get autoremove -y \
81+ && rm -rf /var/lib/apt/lists/*
7482RUN useradd -ms $(which bash) www
75- RUN mkdir /opt/node && \
76- cd /opt/node && \
77- curl https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-$(echo ${TARGETARCH} | sed 's/amd64/x64/' ).tar.xz | tar xJ --strip-components=1 && \
78- rm -rf /opt/node/include /opt/node/lib/node_modules
7983ENV PATH="/opt/node/bin:$PATH"
8084
8185# Set up chamber for SSM-based secrets management
You can’t perform that action at this time.
0 commit comments