Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Using debian buster #112

Closed
wants to merge 1 commit into from
Closed

Using debian buster #112

wants to merge 1 commit into from

Conversation

procrastinatio
Copy link
Contributor

@procrastinatio procrastinatio commented Jun 24, 2020

See #111

@procrastinatio procrastinatio requested a review from ltkum June 24, 2020 10:03
@procrastinatio
Copy link
Contributor Author

procrastinatio commented Jun 24, 2020

@ltkum Do we make a base image, with what content?

From my POV,

  • user geoadmin
  • standard path /app
  • What debian packages? Pkg like bash, curl, make, things like proj4 are not used everwhere.
  • What pip packages?

@ltkum
Copy link
Contributor

ltkum commented Jul 6, 2020

I feel you POV is solid.
In my opinion, we should keep the base image as minimal as possible, with only the mandatory / most common packages.
I would keep:
`
FROM debian:buster-slim
ENV DEBIAN_FRONTEND noninteractive
RUN groupadd -r geoadmin && useradd -r -s /bin/false -g geoadmin geoadmin

RUN apt-get update && apt-get install apt-utils
; DEBIAN_FRONTEND=noninteractive apt-get install -y --upgrade ca-certificates
; DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold"
bash
curl
python3.7-minimal
python3-dev
python3-pip
&& apt-get clean \

WORKDIR app/
`

We could make a second image, flask-3.7, which would be something like
FROM swisstopo/python_37_buster RUN pip3 install flask gunicorn
but I would refrain from adding unneeded dependencies. Even Bash and curl are more for comfort and could be removed altogether.

@ltkum
Copy link
Contributor

ltkum commented Jul 6, 2020

After discussing it a bit with @boecklic , it might be worth it to use python:3.7-slim-buster as the base image, and create the geoadmin user each time. That would remove a dependency that we would have to maintain otherwise.

@procrastinatio What do you think ?

@ltkum ltkum closed this Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants