FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 375e6bf1 authored by Robin Goodall's avatar Robin Goodall :speech_balloon:
Browse files

Build slim photo-api-base

parent caa2c7a7
Branches photo-api-base-multiarch
No related tags found
1 merge request!116Photo api base multiarch using slim
......@@ -126,15 +126,14 @@ gcloud-docker-435.0.1:
photo-api-base-py-3-11:
extends: .build_and_push
variables:
IMAGE_TYPE: photo-api-base
IMAGE_TYPE: photo-api-base-slim
IMAGE_NAME: photo-api-base
TAGS: dj3.2-py3.11-fr1.3.0
TAGS: py3.11-fr1.3.0
PYTHON_VERSION: "3.11"
DJANGO_VERSION: "3.2"
FACE_RECOG_VERSION: "1.3.0"
BUILD_ARGS: "PYTHON_VERSION DJANGO_VERSION FACE_RECOG_VERSION"
BUILD_ARGS: "PYTHON_VERSION FACE_RECOG_VERSION"
IMAGE_ARCHS: "linux/amd64,linux/arm64"
WHEN_TO_RUN: "weekly"
IMAGE_ARCH: "linux/amd64,linux/arm64"
photo-api-base:
extends: .build_and_push
......
ARG PYTHON_VERSION
# Use python slim image also built here depending on versions set in CI task variables
FROM registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/python:$PYTHON_VERSION-slim
ARG FACE_RECOG_VERSION
# Ensure packages are up to date and install utils required for face detection (version set in CI vars)
RUN apt-get update && \
apt-get install -y build-essential git gcc cmake libpq-dev libmagic-dev libheif-dev libjpeg-dev && \
apt-get clean && \
pip install --no-cache-dir dlib face_recognition==$FACE_RECOG_VERSION
# Photo API base container (based on debian slim)
Base container used by the Photo API. This base container is abstracted from the
Photo API to allow caching of the base container and faster building of the Photo API.
## Tags
To see the list of tags available visit the [CI job](https://gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/-/blob/master/.gitlab-ci.yml)
## Usage
Use like any upstream image:
```Dockerfile
FROM registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/photo-api-base:py3.11-fr1.3.0
# ...
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment