Skip to content

Commit

Permalink
add more tools
Browse files Browse the repository at this point in the history
  • Loading branch information
chantra committed Aug 23, 2024
1 parent fa29d74 commit 6578347
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions s390x-native.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ FROM s390x/ubuntu:${UBUNTU_VERSION}
# Redefining UBUNTU_VERSION without a value inherits the global default
ARG UBUNTU_VERSION

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install \
git \
jq \
sudo \
tree \
wget

RUN apt-get update \
&& apt-get install -y cmake flex bison build-essential libssl-dev ncurses-dev xz-utils bc rsync libguestfs-tools qemu-kvm qemu-utils linux-image-generic zstd binutils-dev elfutils libcap-dev libelf-dev libdw-dev python3-docutils \
&& apt-get install -y g++ libelf-dev \
Expand Down Expand Up @@ -40,29 +48,31 @@ RUN cd /tmp && \
sed -i'' -e /version/s/6......\"$/${SDK}.0.100\"/ src/global.json && \
git apply /tmp/runner.patch

RUN cd /tmp/runner/src && \
./dev.sh layout && \
./dev.sh package && \
./dev.sh test && \
rm -rf /root/.dotnet /root/.nuget


# amd64 Github Actions Runner.
# Create Github Actions Runner user.
ARG HOMEDIR=/actions-runner
# Copy scripts from myoung34/docker-github-actions-runner
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${VERSION}/entrypoint.sh -o /entrypoint.sh && chmod 755 /entrypoint.sh
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${VERSION}/token.sh -o /token.sh && chmod 755 /token.sh

WORKDIR ${HOMEDIR}
RUN useradd -d ${HOMEDIR} -m runner
RUN echo "runner ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
RUN echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >>/etc/sudoers
# Make sure kvm group exists. This is a no-op when it does.
RUN addgroup --system kvm
RUN usermod -a -G kvm runner

RUN cd /tmp/runner/src && \
./dev.sh layout && \
./dev.sh package && \
./dev.sh test && \
rm -rf /root/.dotnet /root/.nuget

# install actions-runner package as user `runner`
USER runner
ENV USER=runner
WORKDIR ${HOMEDIR}
RUN tar -xz /tmp/runner/_layout/actions-runner-linux-s390x-${VERSION}.tar.gz
USER root

# Copy scripts from myoung34/docker-github-actions-runner
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${VERSION}/entrypoint.sh -o /entrypoint.sh && chmod 755 /entrypoint.sh
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${VERSION}/token.sh -o /token.sh && chmod 755 /token.sh

ENTRYPOINT ["/entrypoint.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]

0 comments on commit 6578347

Please sign in to comment.