Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: Python image selection

Andras Bacsaiad51a9ebc859
diff --git a/src/lib/buildPacks/common.ts b/src/lib/buildPacks/common.ts
index cb47b0dd57..588af6181e 100644
--- a/src/lib/buildPacks/common.ts
+++ b/src/lib/buildPacks/common.ts
@@ -405,7 +405,88 @@ export function setDefaultBaseImage(buildPack) {
label: 'webdevops/php-nginx:7.1-alpine'
}
];
-
+ const pythonVersions = [
+ {
+ value: 'python:3.11-alpine',
+ label: 'python:3.11-alpine'
+ },
+ {
+ value: 'python:3.11-buster',
+ label: 'python:3.11-buster'
+ },
+ {
+ value: 'python:3.11-bullseye',
+ label: 'python:3.11-bullseye'
+ },
+ {
+ value: 'python:3.11-slim-bullseye',
+ label: 'python:3.11-slim-bullseye'
+ },
+ {
+ value: 'python:3.11-alpine',
+ label: 'python:3.11-alpine'
+ },
+ {
+ value: 'python:3.10-buster',
+ label: 'python:3.10-buster'
+ },
+ {
+ value: 'python:3.10-bullseye',
+ label: 'python:3.10-bullseye'
+ },
+ {
+ value: 'python:3.10-slim-bullseye',
+ label: 'python:3.10-slim-bullseye'
+ },
+ {
+ value: 'python:3.9-alpine',
+ label: 'python:3.9-alpine'
+ },
+ {
+ value: 'python:3.9-buster',
+ label: 'python:3.9-buster'
+ },
+ {
+ value: 'python:3.9-bullseye',
+ label: 'python:3.9-bullseye'
+ },
+ {
+ value: 'python:3.9-slim-bullseye',
+ label: 'python:3.9-slim-bullseye'
+ },
+ {
+ value: 'python:3.8-alpine',
+ label: 'python:3.8-alpine'
+ },
+ {
+ value: 'python:3.8-buster',
+ label: 'python:3.8-buster'
+ },
+ {
+ value: 'python:3.8-bullseye',
+ label: 'python:3.8-bullseye'
+ },
+ {
+ value: 'python:3.8-slim-bullseye',
+ label: 'python:3.8-slim-bullseye'
+ },
+ {
+ value: 'python:3.7-alpine',
+ label: 'python:3.7-alpine'
+ },
+ {
+ value: 'python:3.7-buster',
+ label: 'python:3.7-buster'
+ },
+ {
+ value: 'python:3.7-bullseye',
+ label: 'python:3.7-bullseye'
+ },
+ {
+ value: 'python:3.7-slim-bullseye',
+ label: 'python:3.7-slim-bullseye'
+ }
+ ];
let payload = {
baseImage: null,
baseBuildImage: null,
@@ -426,6 +507,7 @@ export function setDefaultBaseImage(buildPack) {
}
if (buildPack === 'python') {
payload.baseImage = 'python:3-alpine';
+ payload.baseImages = pythonVersions;
}
if (buildPack === 'rust') {
payload.baseImage = 'rust:latest';