feat: Python image selection

This commit is contained in:
Andras Bacsai 2022-05-10 11:10:58 +02:00
parent 51a40d049d
commit ad51a9ebc8

View File

@ -405,7 +405,88 @@ export function setDefaultBaseImage(buildPack) {
label: 'webdevops/php-nginx:7.1-alpine' 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 = { let payload = {
baseImage: null, baseImage: null,
baseBuildImage: null, baseBuildImage: null,
@ -426,6 +507,7 @@ export function setDefaultBaseImage(buildPack) {
} }
if (buildPack === 'python') { if (buildPack === 'python') {
payload.baseImage = 'python:3-alpine'; payload.baseImage = 'python:3-alpine';
payload.baseImages = pythonVersions;
} }
if (buildPack === 'rust') { if (buildPack === 'rust') {
payload.baseImage = 'rust:latest'; payload.baseImage = 'rust:latest';