mirror of https://code.onedev.io/onedev/server
20 lines
811 B
Docker
20 lines
811 B
Docker
# Build the docker image for onedev agent
|
|
FROM ubuntu:24.04 AS build
|
|
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
|
RUN curl -fsSL https://get.docker.com | sh
|
|
|
|
FROM ubuntu:24.04
|
|
COPY agent /agent
|
|
COPY entrypoint-agent.sh /root/bin/entrypoint.sh
|
|
COPY --from=build /usr/bin/docker /usr/local/bin/docker
|
|
COPY --from=build /usr/libexec/docker/cli-plugins/docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
|
RUN apt-get update && apt-get install -y locales curl git git-lfs openjdk-11-jre-headless && rm -rf /var/lib/apt/lists/*
|
|
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
|
locale-gen
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
WORKDIR /agent/bin
|
|
RUN ["touch", "/agent/IN_DOCKER"]
|
|
CMD ["/root/bin/entrypoint.sh"]
|