Newer
Older
FROM python:3.10-slim-buster

Andrew Kapuscinski
committed
# Get postgres/mysql development stuff in the image
RUN apt update \
&& apt install -y --no-install-recommends \
gcc \
libmariadb-dev-compat \
libpq-dev \
&& rm -rf /var/lib/apt/lists
# Environment variables
# - CAPO_PROFILE will be overridden for Dev, Test, and Prod

Andrew Kapuscinski
committed
ENV PIP_NO_CACHE_DIR false
ENV CAPO_PROFILE docker

Andrew Kapuscinski
committed

Andrew Kapuscinski
committed
# Create vlapipe group
RUN addgroup --gid 6000 vlapipe && \

Andrew Kapuscinski
committed
# Create vlapipe user placed in vlapipe group
useradd --create-home --comment "" --gid 6000 --uid 6000 vlapipe

Andrew Kapuscinski
committed
# Create almapipe group
RUN addgroup --gid 9233 almapipe && \
# Create almapipe user placed in almapipe group
useradd --create-home --comment "" --gid 9233 --uid 9233 almapipe

Andrew Kapuscinski
committed
# Switch to appuser
USER vlapipe
# Change working directory to /home/ssa/capo
WORKDIR /home/ssa/capo

Andrew Kapuscinski
committed
# set ownership of docker.properties to vlapipe and the vlapipe group
COPY --chown=vlapipe:vlapipe docker.properties docker.properties
# Switch to root
USER root