-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
34 lines (26 loc) · 929 Bytes
/
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
# Copyright (c) 2019 Ableton AG, Berlin. All rights reserved.
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
FROM groovy:4.0.22-jdk21-jammy
USER root
# For add-apt-repository
RUN apt-get update \
&& apt-get install -y software-properties-common=0.99.* --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Add deadsnakes and install Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update \
&& apt-get install -y python3.12=3.12.* --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY pom.xml /opt/
COPY ruleset.groovy /opt/resources/
COPY run_codenarc.py /opt/
WORKDIR /opt
RUN python3.12 run_codenarc.py --resources /opt/resources
RUN groupadd -r jenkins && useradd --no-log-init -r -g jenkins jenkins
USER jenkins
WORKDIR /ws
CMD ["python3.12", "/opt/run_codenarc.py"]