onedev-server/server-product/docker/Dockerfile.server

26 lines
1011 B
Docker

# Build the docker image for onedev server
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
ARG TARGETPLATFORM
COPY app /app
COPY entrypoint-server.sh /root/bin/entrypoint.sh
RUN apt-get update && apt-get install -y locales iproute2 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
# install docker
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
# install kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/${TARGETPLATFORM}/kubectl" && chmod +x kubectl && mv kubectl /usr/local/bin
EXPOSE 6610
EXPOSE 6611
CMD ["/root/bin/entrypoint.sh"]