forked from anup-kodlekere/gaplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ubuntu
50 lines (35 loc) · 1.65 KB
/
Dockerfile.ubuntu
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
FROM ubuntu:22.04
ARG RUNNERREPO="https://github.com/actions/runner" RUNNERPATCH SDK_VERSION ARCH
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update -y && \
apt-get -qq -y install wget git sudo alien curl && \
apt autoclean
RUN apt-get -qq -y install dotnet-sdk-8.0 && \
SDK_VERSION=`dotnet --version` && \
echo "Using SDK - ${SDK_VERSION}"
ADD ${RUNNERPATCH} /tmp/runner.patch
RUN cd /tmp && \
git clone -q ${RUNNERREPO} && \
cd runner && \
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) -b build && \
git apply /tmp/runner.patch && \
sed -i'' -e 's/"version": "8[^"]*"/"version": "'${SDK_VERSION}'"/' src/global.json && \
sed -i'' -e 's/"version": "8[^"]*"/"version": "'${SDK_VERSION}'"/' .devcontainer/devcontainer.json && \
sed -i'' -e 's/DOTNETSDK_VERSION="8[^"]*"/DOTNETSDK_VERSION="'${SDK_VERSION}'"/' src/dev.sh
RUN cd /tmp/runner/src && \
./dev.sh layout && \
./dev.sh package && \
./dev.sh test && \
rm -rf /root/.dotnet /root/.nuget
RUN useradd -c "Action Runner" -m ubuntu && \
usermod -L ubuntu && \
echo "ubuntu ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/ubuntu
RUN mkdir -p /opt/runner && \
tar -xf /tmp/runner/_package/*.tar.gz -C /opt/runner && \
chown -R ubuntu:ubuntu /opt/runner && \
su -c "/opt/runner/config.sh --version" ubuntu
RUN apt-get -qq -y install cmake make automake autoconf m4 gcc-12-base libtool
RUN rm -rf /tmp/runner /tmp/runner.patch
USER ubuntu
EXPOSE 443
CMD /bin/bash