27 lines
644 B
Docker
27 lines
644 B
Docker
ARG TARGET_DIR=target
|
|
|
|
FROM ubuntu:26.04
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates libssl3 openssh-client procps git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
RUN git config --system --add safe.directory '*'
|
|
|
|
RUN useradd -r -s /bin/false appuser
|
|
|
|
RUN mkdir -p /app/data/repos /app/logs \
|
|
&& chown -R appuser:appuser /app
|
|
|
|
COPY ${TARGET_DIR}/release/gitpod /app/gitpod
|
|
RUN chown -R appuser:appuser /app
|
|
|
|
USER appuser
|
|
WORKDIR /app
|
|
|
|
EXPOSE 8080 2222 50051
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8080/health || exit 1
|
|
|
|
CMD ["./gitpod"]
|