From ee830457d19915808f1509942a6987f5f4eb6b7f Mon Sep 17 00:00:00 2001 From: cbluebird Date: Tue, 24 Sep 2024 17:03:22 +0800 Subject: [PATCH] chore: Update Flask Dockerfile to use specific Python version and add Chinese localization support --- Framework/flask/3.0.3/Dockerfile | 2 +- Framework/flask/update_cn_dockerfile.sh | 12 ++++++++++ yaml/Framework/flask/3.0.3/3.0.3.yaml | 31 ------------------------- 3 files changed, 13 insertions(+), 32 deletions(-) create mode 100755 Framework/flask/update_cn_dockerfile.sh delete mode 100644 yaml/Framework/flask/3.0.3/3.0.3.yaml diff --git a/Framework/flask/3.0.3/Dockerfile b/Framework/flask/3.0.3/Dockerfile index 017ea26..aa65947 100644 --- a/Framework/flask/3.0.3/Dockerfile +++ b/Framework/flask/3.0.3/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/labring-actions/devbox/python-3.12:409348 +FROM ghcr.io/labring-actions/devbox/python-3.12:d4059a RUN cd /home/sealos/project && \ rm -rf ./* diff --git a/Framework/flask/update_cn_dockerfile.sh b/Framework/flask/update_cn_dockerfile.sh new file mode 100755 index 0000000..cf7b89e --- /dev/null +++ b/Framework/flask/update_cn_dockerfile.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +DOCKERFILE=$1 +echo "DOCKERFILE: $DOCKERFILE" +TMP_DOCKERFILE="${DOCKERFILE}tmp" +cp "$DOCKERFILE" "$TMP_DOCKERFILE" + +sed -i '$i\ +COPY /OS/debian-ssh/debian.sources /etc/apt/sources.list.d/debian.sources' "$TMP_DOCKERFILE" + +sed -i '$i\ +RUN pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple' "$TMP_DOCKERFILE" \ No newline at end of file diff --git a/yaml/Framework/flask/3.0.3/3.0.3.yaml b/yaml/Framework/flask/3.0.3/3.0.3.yaml deleted file mode 100644 index 9dc28ab..0000000 --- a/yaml/Framework/flask/3.0.3/3.0.3.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: devbox.sealos.io/v1alpha1 -kind: Runtime -metadata: - name: flask-3-0-3 - namespace: devbox-system -spec: - classRef: flask - config: - image: ghcr.io/labring-actions/devbox/flask-3.0.3:2395d3 - ports: - - containerPort: 22 - name: devbox-ssh-port - protocol: TCP - user: sealos - workingDir: /home/sealos/project - releaseCommand: - - /bin/bash - - -c - releaseArgs: - - /home/sealos/project/entrypoint.sh - description: flask 3.0.3 - version: "3.0.3" ---- -apiVersion: devbox.sealos.io/v1alpha1 -kind: RuntimeClass -metadata: - name: flask -spec: - title: "flask" - kind: Framework - description: flask