build: add more utils packages
Signed-off-by: zwtop <wang.zhan@smartx.com>
This commit is contained in:
parent
4ca37fbdf2
commit
b1bc0400d5
|
|
@ -32,6 +32,20 @@ RUN apt-get update -y \
|
|||
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
|
||||
apt-get install -y --no-install-recommends git-lfs
|
||||
|
||||
# custome apt package
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
make \
|
||||
build-essential \
|
||||
ssh \
|
||||
iputils-ping \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# kubectl
|
||||
RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
|
||||
&& curl -fLo /usr/bin/kubectl https://dl.k8s.io/release/v1.26.0/bin/linux/${ARCH}/kubectl \
|
||||
&& chmod +x /usr/bin/kubectl
|
||||
|
||||
# Runner user
|
||||
RUN adduser --disabled-password --gecos "" --uid $RUNNER_USER_UID runner \
|
||||
&& groupadd docker --gid $DOCKER_GROUP_GID \
|
||||
|
|
@ -104,6 +118,8 @@ COPY docker-shim.sh /usr/local/bin/docker
|
|||
# Configure hooks folder structure.
|
||||
COPY hooks /etc/arc/hooks/
|
||||
|
||||
COPY buildx-config.toml /etc/arc/config/
|
||||
|
||||
VOLUME /var/lib/docker
|
||||
|
||||
# Add the Python "User Script Directory" to the PATH
|
||||
|
|
@ -116,5 +132,9 @@ RUN echo "PATH=${PATH}" > /etc/environment \
|
|||
# No group definition, as that makes it harder to run docker.
|
||||
USER runner
|
||||
|
||||
RUN mkdir -p $HOME/.docker/cli-plugins/
|
||||
ADD https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64 /home/runner/.docker/cli-plugins/docker-buildx
|
||||
RUN sudo chmod +x $HOME/.docker/cli-plugins/docker-buildx
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "-c"]
|
||||
CMD ["entrypoint-dind.sh"]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
[registry."docker.io"]
|
||||
mirrors = ["docker-registry.docker-registry.svc:5000"]
|
||||
|
||||
[registry."docker-registry.docker-registry.svc:5000"]
|
||||
http = true
|
||||
|
||||
[registry."docker-registry-cache.docker-registry.svc:5000"]
|
||||
http = true
|
||||
|
|
@ -176,5 +176,7 @@ fi
|
|||
log.notice "WARNING LATEST TAG HAS BEEN DEPRECATED. SEE GITHUB ISSUE FOR DETAILS:"
|
||||
log.notice "https://github.com/actions/actions-runner-controller/issues/2056"
|
||||
|
||||
docker buildx create --name action-runner --use --driver=docker-container --config /etc/arc/config/buildx-config.toml
|
||||
|
||||
update-status "Idle"
|
||||
exec env -- "${env[@]}" ./run.sh
|
||||
|
|
|
|||
Loading…
Reference in New Issue