2024-12-20 14:58:15 -05:00
|
|
|
FROM node:23.5.0-bookworm
|
2023-12-19 13:37:16 -05:00
|
|
|
|
|
|
|
SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get --assume-yes --no-install-recommends install \
|
|
|
|
jq \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2024-02-13 05:53:48 -05:00
|
|
|
ENV APP_DIR=/app
|
|
|
|
WORKDIR "${APP_DIR}"
|
2023-12-19 13:37:16 -05:00
|
|
|
|
2024-02-13 05:53:48 -05:00
|
|
|
COPY package.json package-lock.json ./
|
2023-12-19 13:37:16 -05:00
|
|
|
|
2024-02-13 05:53:48 -05:00
|
|
|
RUN npm ci \
|
|
|
|
&& rm -rf ~/.npm
|
2023-12-21 09:03:14 -05:00
|
|
|
|
2024-02-13 05:53:48 -05:00
|
|
|
ENV NODE_PATH="${APP_DIR}/node_modules"
|
|
|
|
ENV PATH="${NODE_PATH}/.bin:${PATH}"
|
2023-12-19 13:37:16 -05:00
|
|
|
|
2023-12-22 07:22:15 -05:00
|
|
|
# Split this from the previous RUN instruction so we can cache the costly installation step
|
|
|
|
# hadolint ignore=DL3059
|
2024-09-19 04:53:13 -04:00
|
|
|
RUN release-please --version \
|
2023-12-21 09:03:14 -05:00
|
|
|
&& git config --global --add safe.directory /source-repository
|
2023-12-22 07:22:15 -05:00
|
|
|
|
|
|
|
ARG USERNAME=super-linter-dev
|
|
|
|
ARG UID=1000
|
|
|
|
ARG GID=1000
|
|
|
|
RUN groupadd -g ${GID} -o "${USERNAME}" \
|
|
|
|
&& useradd -m -u ${UID} -g ${GID} -o -s /bin/bash -l "${USERNAME}"
|
2024-07-11 02:08:23 -04:00
|
|
|
USER $USERNAME
|