Skip to content

Commit

Permalink
Dockerfile: Switch base image: python/3.11-alpine
Browse files Browse the repository at this point in the history
psycopg2-binary stopped shipping for 3.6 and 3.7, so using RH's
ubi8/ubi-minimal wasn't going to work anymore. ubi8/python-39 seemed
promising, but it turns out that the UBI Python images don't allow
package installs.

Alpine is smaller, faster and more straightforward.

Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Jul 31, 2023
1 parent b8ed875 commit d2449bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
FROM python:3.11-alpine
EXPOSE 8080
RUN microdnf update -y && \
microdnf install -y \
curl \
lsof \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
tzdata
ENV TZ="UTC"
RUN apk add curl tzdata && \
pip install -U pip

# Install dependencies:
COPY requirements.txt .
Expand All @@ -21,4 +15,4 @@ COPY config.py.in /paddles/config.py
COPY alembic.ini.in /paddles/alembic.ini
COPY container_start.sh /paddles/container_start.sh
WORKDIR /paddles
CMD bash container_start.sh
CMD sh container_start.sh
2 changes: 1 addition & 1 deletion container_start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -ex
trap exit TERM
pecan populate config.py
Expand Down

0 comments on commit d2449bc

Please sign in to comment.