forked from anup-kodlekere/gaplib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.opensuse
56 lines (40 loc) · 1.89 KB
/
Dockerfile.opensuse
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
FROM registry.opensuse.org/opensuse/tumbleweed:latest
ARG RUNNERREPO="https://github.com/actions/runner" SDK RUNNERPATCH ARCH
RUN zypper dup -y && \
zypper update -y && \
zypper install -y wget git which libicu73 gawk sudo
COPY build-files/convert-rpm.sh /tmp
RUN /tmp/convert-rpm.sh ${SDK}
RUN rpm --install --nodeps --nosignature /tmp/*.rpm && \
rm -rf /tmp/*.rpm && \
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 opensuse && \
usermod -L opensuse && \
echo "opensuse ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/opensuse
RUN mkdir -p /opt/runner && \
tar -xf /tmp/runner/_package/*.tar.gz -C /opt/runner && \
chown -R opensuse:opensuse /opt/runner && \
su -c "/opt/runner/config.sh --version" opensuse
RUN zypper install -y cmake make automake autoconf m4 gcc gcc-c++ libtool
RUN rm -rf /tmp/runner /tmp/runner.patch /tmp/convert-rpm.sh
USER opensuse
EXPOSE 443
CMD /bin/bash