11# While optional this tells the Docker builder of the version
22# syntax=docker/dockerfile:1
3- ARG PYTHON_VERSION=3.11.1 -slim-bullseye
3+ ARG PYTHON_VERSION=3.11.4 -slim-bullseye
44
55# Base image for Python applications
66# This image is particularly for a web server using uvicorn
@@ -11,16 +11,23 @@ EXPOSE 80
1111
1212# Update the based image to latest versions of packages
1313# python 3.10 seems to want python3-tk installed
14- RUN apt-get update \
15- && apt-get -y upgrade \
16- && apt-get install -y --no-install-recommends gcc python3-dev build-essential libpq-dev python3-tk postgresql-client \
17- && apt-get clean \
14+ RUN apt update \
15+ && apt -y upgrade \
16+ && apt install -y --no-install-recommends gcc python3-dev \
17+ build-essential libpq-dev python3-tk postgresql-client curl \
18+ && apt clean \
1819 && rm -rf /var/lib/apt/lists/*
1920
21+ # Install task from their servers, not this requires curl
22+ # so you must only have this tkas post the apt updates
23+ RUN sh -c "$(curl --location https://taskfile.dev/install.sh)" \
24+ -- -d -b /usr/local/bin
25+
2026# Copy the files in the src directory which is the app package
2127# and the dependency matrix dedescribed by pyproject.toml
2228WORKDIR /opt/${PROJ_NAME}
2329COPY ./src/. .
30+ COPY Taskfile.prod.yml Taskfile.yml
2431
2532# Ask poetry to install all packages including the app
2633# not in virtual machine as we are in a container
0 commit comments