Skip to content
Snippets Groups Projects
Dockerfile 914 B
Newer Older
FROM python:3.12-alpine
Erik Reid's avatar
Erik Reid committed

ARG ARTIFACT_VERSION

RUN apk add --no-cache gcc libc-dev libffi-dev curl vim && \
    addgroup -S appgroup && adduser -S appuser -G appgroup -h /app

Erik Reid's avatar
Erik Reid committed
RUN pip install \
    --pre \
    --trusted-host 150.254.211.2 \
    --extra-index-url https://150.254.211.2/artifactory/api/pypi/geant-swd-pypi/simple \
Karel van Klink's avatar
Karel van Klink committed
    --target /app \
Erik Reid's avatar
Erik Reid committed
    geant-service-orchestrator==${ARTIFACT_VERSION}

# Set the environment variable for the translations directory
Karel van Klink's avatar
Karel van Klink committed
ENV TRANSLATIONS_DIR=/app/gso/translations/
Neda Moeini's avatar
Neda Moeini committed

# Copy the shell scripts and ensure scripts do not have Windows line endings and make them executable
COPY start-app.sh start-worker.sh start-scheduler.sh /app/
RUN sed -i 's/\r$//' start-app.sh start-worker.sh start-scheduler.sh && \
    chmod 755 start-app.sh start-worker.sh start-scheduler.sh
USER appuser
ENTRYPOINT ["/app/start-app.sh"]