[ci/Dockerfile] use of alpine OS instead of debian, bump python to version 3.11
This commit is contained in:
parent
3b7d3bda5c
commit
65ecf9817c
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
# Official language image. Look for the different tagged releases at:
|
# Official language image. Look for the different tagged releases at:
|
||||||
# https://hub.docker.com/r/library/python/tags/
|
# 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
|
# Change pip's cache directory to be inside the project directory since we can
|
||||||
# only cache local items.
|
# only cache local items.
|
||||||
|
@ -33,7 +33,7 @@ stages:
|
||||||
|
|
||||||
.before_script_template: &test
|
.before_script_template: &test
|
||||||
before_script:
|
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
|
- python3 -V # Print out python version for debugging
|
||||||
- pip3 install pipenv
|
- pip3 install pipenv
|
||||||
- pipenv install --dev --skip-lock
|
- pipenv install --dev --skip-lock
|
||||||
|
@ -60,7 +60,7 @@ test:
|
||||||
build_pypi:
|
build_pypi:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
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
|
- python3 -V # Print out python version for debugging
|
||||||
- pip3 install pipenv
|
- pip3 install pipenv
|
||||||
- pipenv install --dev --skip-lock
|
- pipenv install --dev --skip-lock
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM docker.io/python:3.10.5-slim-bullseye
|
FROM python:3.11.4-alpine3.18
|
||||||
COPY . /halfapi
|
COPY . /halfapi
|
||||||
WORKDIR /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 gunicorn uvicorn
|
||||||
RUN pip install .
|
RUN pip install .
|
||||||
CMD gunicorn halfapi.app
|
CMD gunicorn halfapi.app
|
||||||
|
|
Loading…
Reference in New Issue