Repository navigation
Expand file tree
/
Copy pathContainerfile
More file actions
51 lines (37 loc) · 1.46 KB
/
Copy pathContainerfile
File metadata and controls
51 lines (37 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM docker.io/library/node:24-alpine AS base
ARG NPM_VERSION=12.0.1
RUN npm install --global "npm@${NPM_VERSION}" \
&& npm cache clean --force
###############################################################################
FROM base AS build
WORKDIR /npm
COPY package.json /npm
RUN npm install
###############################################################################
FROM base AS final
LABEL org.label-schema.maintainer="Voxpupuli Team <voxpupuli@groups.io>" \
org.label-schema.vendor="Voxpupuli" \
org.label-schema.url="https://github.com/voxpupuli/container-commitlint" \
org.label-schema.name="Vox Pupuli Container for commitlint" \
org.label-schema.license="AGPL-3.0-or-later" \
org.label-schema.vcs-url="https://github.com/voxpupuli/container-commitlint" \
org.label-schema.schema-version="1.0" \
org.label-schema.dockerfile="/Containerfile"
COPY Containerfile /
COPY container-entrypoint.sh /
COPY container-entrypoint.d /container-entrypoint.d
COPY --from=build /npm /npm
RUN apk update && apk upgrade --no-cache \
&& apk add --no-cache --update \
bash \
git \
git-lfs \
socat \
&& chmod +x /container-entrypoint.sh \
# fix ENOGITREPO Not running from a git repository.
&& git config --global --add safe.directory '*'
WORKDIR /data
ENV PATH="$PATH:/npm/node_modules/.bin"
ENV NODE_OPTIONS="--use-openssl-ca"
ENTRYPOINT [ "/container-entrypoint.sh" ]
CMD [ "--last" ]