mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
1. Use 18.04 instead of 22.04 as JSW has issues running on 22.04 currently 2. Push to test tag if build.sh runs without release param 3. Improve agent entrypoint to make it able to respond to ctrl-c when running in console mode
19 lines
701 B
Docker
19 lines
701 B
Docker
# Build the docker image for onedev agent
|
|
FROM ubuntu:18.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:18.04
|
|
COPY agent /agent
|
|
COPY entrypoint-agent.sh /root/bin/entrypoint.sh
|
|
COPY --from=build /usr/bin/docker /usr/local/bin/docker
|
|
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"]
|