Skip to content

Fix Docker tutorial for latest python:3.12-slim base image #1493

Description

@andhisan

Link to doc page in question (if any):

https://docs.streamlit.io/deploy/tutorials/docker

Name of the Streamlit feature whose docs need improvement:

Deploying Streamlit using Docker

What you think the docs should say:

The Docker tutorial currently installs software-properties-common:

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

However, the latest python:3.12-slim image appears to be based on Debian 13 / Trixie, where software-properties-common is no longer available. As a result, the documented Dockerfile can fail with:

E: Unable to locate package software-properties-common

A similar Debian 13 / Trixie issue has been reported in another OSS project:
https://github.com/dokku/dokku/issues/7877

I tested the tutorial with the documented requirements.txt, and it seems to work after simply removing software-properties-common.

If this package is not required for the tutorial, I think the docs should remove it:

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions