[ci/Dockerfile] use of alpine OS instead of debian, bump python to version 3.11

This commit is contained in:
maxime 2023-08-09 14:31:27 +02:00
parent 3b7d3bda5c
commit 65ecf9817c
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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