-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.24 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
FROM mcr.microsoft.com/dotnet/sdk:6.0
ARG DEBIAN_FRONTEND=noninteractive
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
ENV USERNAME=jenkins
ENV USERGROUP=jenkins
ENV USERID=2000
ENV HOME /home/${USERNAME}
ENV WORKDIR /home/${USERNAME}
ENV DOCFX_VER 2.61.0
ENV MONO_VER 6.12.0
# Add jenkins user
RUN addgroup --gid ${USERID} ${USERGROUP}
RUN adduser --uid ${USERID} --gid ${USERID} --disabled-password --gecos "" ${USERNAME}
RUN chmod 775 $HOME
WORKDIR $WORKDIR
# Setup APT
RUN apt-get update && apt-get install -y --no-install-recommends gnupg
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&& echo "deb http://download.mono-project.com/repo/debian stable-buster/snapshots/$MONO_VER main" | tee /etc/apt/sources.list.d/mono-official-stable.list \
&& apt-get update
# Install packages
RUN apt-get install -y --no-install-recommends \
nodejs unzip git-lfs \
mono-devel msbuild ca-certificates-mono \
python3 python3-pip \
vim
# Install python modules
RUN pip3 install --no-cache-dir setuptools
RUN pip3 install --no-cache-dir pygithub
RUN pip3 install --no-cache-dir boto3
# Install DocFX
RUN dotnet tool install -g docfx --version $DOCFX_VER
ENV PATH="$PATH:/home/jenkins/.dotnet/tools"