From 65ecf9817c6136314efbbb8c32f1022a389e7792 Mon Sep 17 00:00:00 2001 From: maxime Date: Wed, 9 Aug 2023 14:31:27 +0200 Subject: [PATCH] [ci/Dockerfile] use of alpine OS instead of debian, bump python to version 3.11 --- .gitlab-ci.yml | 6 +++--- Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94a16c9..f261c15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ # Official language image. Look for the different tagged releases at: # https://hub.docker.com/r/library/python/tags/ -image: python:3.9-bullseye +image: python:3.11.4-alpine3.18 # Change pip's cache directory to be inside the project directory since we can # only cache local items. @@ -33,7 +33,7 @@ stages: .before_script_template: &test before_script: - - apt-get update && apt-get -y install python3-venv + - apk update && apk add py3-virtualenv py3-pip - python3 -V # Print out python version for debugging - pip3 install pipenv - pipenv install --dev --skip-lock @@ -60,7 +60,7 @@ test: build_pypi: stage: build script: - - apt-get update && apt-get -y install python3-venv + - apk update && apk add py3-virtualenv py3-pip - python3 -V # Print out python version for debugging - pip3 install pipenv - pipenv install --dev --skip-lock diff --git a/Dockerfile b/Dockerfile index 2eaf23f..41f3a18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 -FROM docker.io/python:3.10.5-slim-bullseye +FROM python:3.11.4-alpine3.18 COPY . /halfapi WORKDIR /halfapi -RUN apt-get update > /dev/null && apt-get -y install git > /dev/null +RUN apk update > /dev/null && apk add git > /dev/null RUN pip install gunicorn uvicorn RUN pip install . CMD gunicorn halfapi.app