-
-
Notifications
You must be signed in to change notification settings - Fork 290
Expand file tree
/
Copy pathDockerfile-custom-flavor
More file actions
75 lines (63 loc) · 2.58 KB
/
Dockerfile-custom-flavor
File metadata and controls
75 lines (63 loc) · 2.58 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
70
71
72
73
74
75
# syntax=docker/dockerfile:1
###############################################
###############################################
## Dockerfile to build a custom flavor image ##
###############################################
###############################################
FROM ghcr.io/astral-sh/uv:0.10.7 AS uv
##################
# Get base image #
##################
FROM python:3.13-alpine3.23
RUN apk -U --no-cache upgrade \
&& apk add --no-cache \
bash \
curl \
git \
git-lfs \
make \
docker \
npm \
nodejs-current \
yarn \
&& git config --global core.autocrlf true
ENV NODE_OPTIONS="--max-old-space-size=8192" \
NODE_ENV=production \
BUILD_CUSTOM_FLAVOR=true
# Copy the content of the current directory into the image
COPY --from=uv /uv /uvx /bin/
COPY . /megalinter-builder
WORKDIR /megalinter-builder
RUN uv pip install --system -e . \
&& uv pip install --system --requirement .config/python/dev/requirements.txt
###########################
# Get the build arguments #
###########################
ARG BUILD_DATE
ARG BUILD_REVISION
ARG BUILD_VERSION
#################################################
# Set ENV values used for debugging the version #
#################################################
ENV BUILD_DATE=$BUILD_DATE \
BUILD_REVISION=$BUILD_REVISION \
BUILD_VERSION=$BUILD_VERSION
#########################################
# Label the instance and set maintainer #
#########################################
LABEL com.github.actions.name="MegaLinter Flavor Builder" \
com.github.actions.description="The ultimate linters aggregator to make sure your projects are clean" \
com.github.actions.icon="code" \
com.github.actions.color="red" \
maintainer="Nicolas Vuillamy <nicolas.vuillamy@gmail.com>" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.revision=$BUILD_REVISION \
org.opencontainers.image.version=$BUILD_VERSION \
org.opencontainers.image.authors="Nicolas Vuillamy <nicolas.vuillamy@gmail.com>" \
org.opencontainers.image.url="https://megalinter.io" \
org.opencontainers.image.source="https://github.com/oxsecurity/megalinter" \
org.opencontainers.image.documentation="https://megalinter.io" \
org.opencontainers.image.vendor="Nicolas Vuillamy" \
org.opencontainers.image.description="Generate your custom MegaLinter flavor"
RUN chmod +x /megalinter-builder/entrypoint.sh
ENTRYPOINT ["/bin/bash", "/megalinter-builder/entrypoint.sh"]