-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
84 lines (77 loc) · 2.49 KB
/
Dockerfile
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM alpine AS fetcher
RUN \
apk add \
curl && \
LATEST_DOCKERX=$(curl --silent "https://api.github.com/repos/docker/buildx/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 2-) && \
echo "**** Acquire docker-buildx" && \
curl \
-L \
--output /docker-buildx \
"https://github.com/docker/buildx/releases/download/v${LATEST_DOCKERX}/buildx-v${LATEST_DOCKERX}.linux-amd64" && \
chmod a+x \
/docker-buildx && \
echo "**** Acquire discord.sh from ChaoticWeg/discord.sh" && \
curl \
-L \
--output /discord.sh \
https://raw.githubusercontent.com/ChaoticWeg/discord.sh/master/discord.sh && \
chmod a+x \
/discord.sh
FROM docker:27.5.0-dind
LABEL maintainer="Griefed <[email protected]>"
LABEL description="Provides GitLab Semantic Release, buildx, JDK 8, NodeJS for Griefed's GitLab CI/CD pipelines."
COPY --from=fetcher /docker-buildx /usr/lib/docker/cli-plugins/docker-buildx
COPY --from=fetcher /discord.sh /discord.sh
ENV DOCKER_CLI_EXPERIMENTAL=enabled
RUN \
echo "**** Updating and installing our packages ****" && \
apk update && \
apk upgrade && \
apk add --no-cache \
--repository https://dl-cdn.alpinelinux.org/alpine/v3.20/main/ \
nodejs \
npm && \
apk add --no-cache \
bash \
ca-certificates \
curl \
git \
jq \
nodejs \
npm \
openjdk8 && \
echo "node version is: " && \
node -v && \
echo "npm version is: " && \
npm -v && \
echo "updating npm..." && \
npm update -g && \
echo "node version is: " && \
node -v && \
echo "npm version is: " && \
npm -v && \
echo "**** Installing GitLab Semantic Release ****" && \
npm install -g \
conventional-changelog-conventionalcommits \
semantic-release \
@semantic-release/changelog \
@semantic-release/commit-analyzer \
@semantic-release/exec \
@semantic-release/git \
@semantic-release/gitlab \
@semantic-release/npm \
@semantic-release/release-notes-generator && \
echo "**** Making docker-buildx and discord.sh executable for all ****" && \
chmod a+x \
/usr/lib/docker/cli-plugins/docker-buildx && \
chmod a+x \
/discord.sh && \
echo "**** Installing quasar ****" && \
npm install -g \
@quasar/cli && \
echo "**** Installing act ****" && \
curl https://raw.githubusercontent.com/nektos/act/852959e1e14bf5cd9c0284d15ca899bef68ff4af/install.sh | bash && \
echo "**** Cleanup ****" && \
rm -rf \
/var/cache/apk/* \
/tmp/*