Repository navigation
Expand file tree
/
Copy pathContainerfile
More file actions
69 lines (52 loc) · 2.25 KB
/
Copy pathContainerfile
File metadata and controls
69 lines (52 loc) · 2.25 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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-semantic-release" \
org.label-schema.name="Vox Pupuli Container for semantic-release" \
org.label-schema.license="AGPL-3.0-or-later" \
org.label-schema.vcs-url="https://github.com/voxpupuli/container-semantic-release" \
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 scripts /scripts
COPY --from=build /npm /npm
RUN apk update && apk upgrade --no-cache \
&& apk add --no-cache --update \
bash \
curl \
git \
git-lfs \
jq \
openssh-client \
socat \
&& chmod +x /container-entrypoint.sh /container-entrypoint.d/*.sh
# fix ENOGITREPO Not running from a git repository.
RUN git config set --system --append safe.directory /data
WORKDIR /data
ENV CERT_JSON=""
ENV PATH="$PATH:/npm/node_modules/.bin"
ENV NODE_OPTIONS="--use-openssl-ca"
# The CI_* are empty, because container runtime does not know about them on build time.
ENV ROCKETCHAT_EMOJI=":tada:"
ENV ROCKETCHAT_MESSAGE_TEXT="A new tag for the project ${CI_PROJECT_NAME} was created by ${CI_COMMIT_AUTHOR}."
ENV ROCKETCHAT_HOOK_URL="https://rocketchat.example.com/hooks/here_be_dragons"
ENV ROCKETCHAT_TAGS_URL="${CI_PROJECT_URL}/-/tags"
ENV MATTERMOST_EMOJI=":tada:"
ENV MATTERMOST_USERNAME="Semantic Release"
ENV MATTERMOST_MESSAGE_TEXT="A new tag for the project ${CI_PROJECT_NAME} was created by ${CI_COMMIT_AUTHOR}."
ENV MATTERMOST_HOOK_URL="https://mattermost.example.com/hooks/here_be_dragons"
ENV MATTERMOST_TAGS_URL="${CI_PROJECT_URL}/-/tags"
ENTRYPOINT [ "/container-entrypoint.sh" ]
CMD [ "--dry-run" ]