forked from anup-kodlekere/gaplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.almalinux
51 lines (37 loc) · 1.78 KB
/
Dockerfile.almalinux
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
FROM almalinux:9
ARG RUNNERREPO="https://github.com/actions/runner" RUNNERPATCH SDK ARCH
RUN dnf update -y -q && \
dnf install -y -q wget git which langpacks-en glibc-all-langpacks sudo
RUN dnf install -y -q dotnet-sdk-${SDK}.0 && \
echo "Using SDK - `dotnet --version`"
COPY ${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
RUN if [ "${SDK}" -ne 6 ]; then \
cd /usr/lib64/dotnet/packs; \
ln -s Microsoft.AspNetCore.App.Ref Microsoft.AspNetCore.App.Runtime.linux-${ARCH}; \
ln -s Microsoft.AspNetCore.App.Ref Microsoft.AspNetCore.App.linux-${ARCH}; \
ln -s Microsoft.NETCore.App.Host.rhel.9-${ARCH} Microsoft.NETCore.App.Host.linux-${ARCH}; \
ln -s Microsoft.NETCore.App.Ref Microsoft.NETCore.App.Runtime.linux-${ARCH}; \
fi
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 almalinux && \
usermod -L almalinux && \
echo "almalinux ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/almalinux
RUN mkdir -p /opt/runner && \
tar -xf /tmp/runner/_package/*.tar.gz -C /opt/runner && \
chown -R almalinux:almalinux /opt/runner && \
su -c "/opt/runner/config.sh --version" almalinux
RUN dnf install -y -q cmake make automake autoconf m4 gcc gcc-c++ libtool epel-release
RUN rm -rf /tmp/runner /var/cache/dnf/* /tmp/runner.patch && \
dnf clean all
USER almalinux
EXPOSE 443
CMD /bin/bash