diff --git a/APPLICATION/grafana/7.5.11/8.6/Dockerfile b/APPLICATION/grafana/7.5.11/8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..70ec36c06b96a12b62a8165c1d806978e7397cd3 --- /dev/null +++ b/APPLICATION/grafana/7.5.11/8.6/Dockerfile @@ -0,0 +1,28 @@ +FROM openanolis/anolisos:8.6 + +LABEL maintainer="OpenAnolis Cloud Native SIG" + +RUN yum -y update; \ + yum -y install grafana; \ + yum clean all + +ENV GF_PATHS_CONFIG="/etc/grafana/grafana.ini" \ + GF_PATHS_DATA="/var/lib/grafana" \ + GF_PATHS_HOME="/usr/share/grafana" \ + GF_PATHS_LOGS="/var/log/grafana" \ + GF_PATHS_PLUGINS="/var/lib/grafana/plugins" \ + GF_PATHS_PROVISIONING="/etc/grafana/provisioning" + +WORKDIR $GF_PATHS_HOME + +RUN chown -R "grafana:grafana" "$GF_PATHS_PROVISIONING"; \ + chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" + +EXPOSE 3000 + +COPY run.sh /run.sh + +USER grafana + +ENTRYPOINT ["/run.sh"] + diff --git a/APPLICATION/grafana/7.5.11/8.6/run.sh b/APPLICATION/grafana/7.5.11/8.6/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..dfda5c0b1c2247b4e8d4c2197b0edb27af7d4691 --- /dev/null +++ b/APPLICATION/grafana/7.5.11/8.6/run.sh @@ -0,0 +1,89 @@ +#!/bin/bash -e + +PERMISSIONS_OK=0 + +if [ ! -r "$GF_PATHS_CONFIG" ]; then + echo "GF_PATHS_CONFIG='$GF_PATHS_CONFIG' is not readable." + PERMISSIONS_OK=1 +fi + +if [ ! -w "$GF_PATHS_DATA" ]; then + echo "GF_PATHS_DATA='$GF_PATHS_DATA' is not writable." + PERMISSIONS_OK=1 +fi + +if [ ! -r "$GF_PATHS_HOME" ]; then + echo "GF_PATHS_HOME='$GF_PATHS_HOME' is not readable." + PERMISSIONS_OK=1 +fi + +if [ $PERMISSIONS_OK -eq 1 ]; then + echo "You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later" +fi + +if [ ! -d "$GF_PATHS_PLUGINS" ]; then + mkdir "$GF_PATHS_PLUGINS" +fi + +if [ ! -z ${GF_AWS_PROFILES+x} ]; then + > "$GF_PATHS_HOME/.aws/credentials" + + for profile in ${GF_AWS_PROFILES}; do + access_key_varname="GF_AWS_${profile}_ACCESS_KEY_ID" + secret_key_varname="GF_AWS_${profile}_SECRET_ACCESS_KEY" + region_varname="GF_AWS_${profile}_REGION" + + if [ ! -z "${!access_key_varname}" -a ! -z "${!secret_key_varname}" ]; then + echo "[${profile}]" >> "$GF_PATHS_HOME/.aws/credentials" + echo "aws_access_key_id = ${!access_key_varname}" >> "$GF_PATHS_HOME/.aws/credentials" + echo "aws_secret_access_key = ${!secret_key_varname}" >> "$GF_PATHS_HOME/.aws/credentials" + if [ ! -z "${!region_varname}" ]; then + echo "region = ${!region_varname}" >> "$GF_PATHS_HOME/.aws/credentials" + fi + fi + done + + chmod 600 "$GF_PATHS_HOME/.aws/credentials" +fi + +# Convert all environment variables with names ending in __FILE into the content of +# the file that they point at and use the name without the trailing __FILE. +# This can be used to carry in Docker secrets. +for VAR_NAME in $(env | grep '^GF_[^=]\+__FILE=.\+' | sed -r "s/([^=]*)__FILE=.*/\1/g"); do + VAR_NAME_FILE="$VAR_NAME"__FILE + if [ "${!VAR_NAME}" ]; then + echo >&2 "ERROR: Both $VAR_NAME and $VAR_NAME_FILE are set (but are exclusive)" + exit 1 + fi + echo "Getting secret $VAR_NAME from ${!VAR_NAME_FILE}" + export "$VAR_NAME"="$(< "${!VAR_NAME_FILE}")" + unset "$VAR_NAME_FILE" +done + +export HOME="$GF_PATHS_HOME" + +if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then + OLDIFS=$IFS + IFS=',' + for plugin in ${GF_INSTALL_PLUGINS}; do + IFS=$OLDIFS + if [[ $plugin =~ .*\;.* ]]; then + pluginUrl=$(echo "$plugin" | cut -d';' -f 1) + pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2) + grafana cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}" + else + grafana cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin} + fi + done +fi + +exec grafana-server \ + --homepath="$GF_PATHS_HOME" \ + --config="$GF_PATHS_CONFIG" \ + --packaging=docker \ + "$@" \ + cfg:default.log.mode="console" \ + cfg:default.paths.data="$GF_PATHS_DATA" \ + cfg:default.paths.logs="$GF_PATHS_LOGS" \ + cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \ + cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING" diff --git a/APPLICATION/grafana/README.md b/APPLICATION/grafana/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4bfe9b1273b6e2f3c61daa3e0c5047529c6074d0 --- /dev/null +++ b/APPLICATION/grafana/README.md @@ -0,0 +1,29 @@ +# Grafana + +# Quick reference + +- Maintained by: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) +- Where to get help: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) + +# Supported tags and respective `Dockerfile` links + +- [`7.5.11-8.6`, `latest`](https://gitee.com/anolis/docker-images/blob/master/grafana/7.5.11/8.6/Dockerfile) + +# Supported architectures + +- arm64, x86-64 + +# Build reference + +## Build multi-arch images and push to registry: +```shell +docker buildx build -t "openanolis/grafana:$VERSION" --platform linux/amd64,linux/arm64 . --push +``` + +# Usage +```shell +docker run -d --name=grafana -p 3000:3000 openanolis/grafana +``` + +# Grafana +The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture. diff --git a/APPLICATION/grafana/buildspec.yml b/APPLICATION/grafana/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..0ba184b1dd237bbf0b3f232efdc733d74b50b8b8 --- /dev/null +++ b/APPLICATION/grafana/buildspec.yml @@ -0,0 +1,31 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE huangxing-container-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildGrafanaECSApplicationDockerImage: + #定义是否构建参数 + build: true + docker_file: + path: APPLICATION/grafana/7.5.11/8.6/Dockerfile + scene: + args: [ ] + tags: [ [ 7.5.11-8.6, 7.5.11-8.6-nydus ] ] + registry: [ [ *ACR_PROD ] ] + # 测试配置 + test_config: [*WORKSPACE, *TEMPLATE] \ No newline at end of file diff --git a/APPLICATION/grafana/version.yml b/APPLICATION/grafana/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..9ff018c9ddb398bbf572342172aa6962f4c26664 --- /dev/null +++ b/APPLICATION/grafana/version.yml @@ -0,0 +1,11 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: grafana + image_type: application + versions: + 7.5.11: + # 对 baseos 的要求,all 表示所有, *AnolisOS8.6 表示 Anolis8.6 + baseos_version: *AnolisOS8.6 + 7.5.12: + baseos_version: *AnolisOS8.8 diff --git a/APPLICATION/httpd/2.4.37/8.6/Dockerfile b/APPLICATION/httpd/2.4.37/8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5e96f58354971a8b8a5111815e90a3e365c868c4 --- /dev/null +++ b/APPLICATION/httpd/2.4.37/8.6/Dockerfile @@ -0,0 +1,31 @@ +FROM openanolis/anolisos:8.6 + +LABEL maintainer="OpenAnolis Cloud Native SIG" + +RUN yum -y update \ + && yum -y install httpd \ + && yum clean all + +ENV HTTPD_PREFIX /usr/local/apache2 + +ENV HTTPD_VERSION 2.4.37 + +ENV HTTPD_PATCHES="" + +RUN set -eux; \ + sed -ri \ + -e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \ + -e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \ + -e 's!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g' \ + "/etc/httpd/conf/httpd.conf" \ + ; \ + httpd -v + +STOPSIGNAL SIGWINCH + +COPY httpd-foreground /usr/local/bin/ + +EXPOSE 80 + +CMD ["httpd-foreground"] + diff --git a/APPLICATION/httpd/2.4.37/8.6/httpd-foreground b/APPLICATION/httpd/2.4.37/8.6/httpd-foreground new file mode 100755 index 0000000000000000000000000000000000000000..48642620df6f8d0dc15e91a472cfa5eb63e7bc0f --- /dev/null +++ b/APPLICATION/httpd/2.4.37/8.6/httpd-foreground @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /etc/httpd/run/httpd.pid + +exec httpd -DFOREGROUND diff --git a/APPLICATION/httpd/README.md b/APPLICATION/httpd/README.md new file mode 100644 index 0000000000000000000000000000000000000000..fb12a3e843ec3bcb4eda6b2d19a0eea5d66b7276 --- /dev/null +++ b/APPLICATION/httpd/README.md @@ -0,0 +1,29 @@ +# Httpd + +# Quick reference + +- Maintained by: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) +- Where to get help: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) + +# Supported tags and respective `Dockerfile` links + +- [`2.4.37-8.6`, `latest`](https://gitee.com/anolis/docker-images/blob/master/httpd/2.4.37/8.6/Dockerfile) + +# Supported architectures + +- arm64, x86-64 + +# Build reference + +## Build multi-arch images and push to registry: +```shell +docker buildx build -t "openanolis/httpd:$VERSION" --platform linux/amd64,linux/arm64 . --push +``` + +# Usage +```shell +docker run -dit --name my-apache-app -p 8080:80 -v "$PWD":/var/www/html/ openanolis/httpd +``` + +# Httpd +The Apache HTTP Server, colloquially called Apache, is a Web server application notable for playing a key role in the initial growth of the World Wide Web. Originally based on the NCSA HTTPd server, development of Apache began in early 1995 after work on the NCSA code stalled. Apache quickly overtook NCSA HTTPd as the dominant HTTP server, and has remained the most popular HTTP server in use since April 1996. diff --git a/APPLICATION/httpd/buildspec.yml b/APPLICATION/httpd/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..5e4b6f2aae3fe43ecfd5a677768e5baf3354de31 --- /dev/null +++ b/APPLICATION/httpd/buildspec.yml @@ -0,0 +1,35 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: + test: &DOCKERHUB_TEST registry.hub.docker.com/openanolis_test + prod: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: + test: &ACR_TEST anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis + prod: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE ai-image-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildHttpdECSApplicationDockerImage: + # 定义是否构建参数 + build: true + docker_file: + path: APPLICATION/httpd/2.4.37/8.6/Dockerfile + scene: + args: [ ] + tags: [ [ 2.4.37-8.6, 2.4.37-8.6-nydus ] ] + registry: [ [ *ACR_TEST ] ] + # 测试配置 + test_config: [*WORKSPACE, *TEMPLATE] \ No newline at end of file diff --git a/APPLICATION/httpd/version.yml b/APPLICATION/httpd/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..da8cf32da06194d04a892d6f43e7596c72342bdd --- /dev/null +++ b/APPLICATION/httpd/version.yml @@ -0,0 +1,9 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: httpd + image_type: application + versions: + 2.4.37: + # 对 baseos 的要求,all 表示所有, *AnolisOS8.6 表示 Anolis8.6 + baseos_version: *AnolisOS8.6 diff --git a/LANGUAGE/dragonwell/8/8.6/Dockerfile b/LANGUAGE/dragonwell/8/8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..da2717a480e8e15f80ede926657e153a4ef86548 --- /dev/null +++ b/LANGUAGE/dragonwell/8/8.6/Dockerfile @@ -0,0 +1,54 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM cloud-native-sig-registry.cn-hangzhou.cr.aliyuncs.com/openanolis/anolisos:8.6 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum clean all + +ENV JAVA_VERSION jdk8u332-b09 + +ARG TARGETARCH + +RUN set -eux; \ + case "${TARGETARCH}" in \ + arm64) \ + ESUM='544a2b75c1b5963664395fba4b58bc6012cd1db36b68c0f1886d81d657a0b24b'; \ + BINARY_URL='https://github.com/alibaba/dragonwell8/releases/download/dragonwell-8.11.12_jdk8u332-ga/Alibaba_Dragonwell_8.11.12_aarch64_linux.tar.gz'; \ + ;; \ + amd64) \ + ESUM='03923f200dffddf9eee2aadc0c495674fe0b87cc2eece94a9a8dec84812d12bd'; \ + BINARY_URL='https://github.com/alibaba/dragonwell8/releases/download/dragonwell-8.11.12_jdk8u332-ga/Alibaba_Dragonwell_8.11.12_x64_linux.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${TARGETARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" + +RUN echo Verifying install ... \ + && echo javac -version && javac -version \ + && echo java -version && java -version \ + && echo Complete. diff --git a/LANGUAGE/dragonwell/README.md b/LANGUAGE/dragonwell/README.md new file mode 100644 index 0000000000000000000000000000000000000000..1e66efeea6dd94fb3b77eeef3ce0922a589f83c9 --- /dev/null +++ b/LANGUAGE/dragonwell/README.md @@ -0,0 +1,24 @@ +# Dragonwell + +# Quick reference + +- Maintained by: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) +- Where to get help: [OpenAnolis CloudNative SIG](https://openanolis.cn/sig/cloud-native) + +# Supported tags and respective `Dockerfile` links + +- [`8-8.6`, `latest`](https://gitee.com/anolis/docker-images/dragonwell/8/8.6/Dockerfile) + +# Supported architectures + +- arm64, amd64 + +# Build reference + +1. Build multi-arch images and push to registry: +```shell +docker buildx build -t "openanolis/dragonwell:$VERSION" --platform linux/amd64,linux/arm64 . --push +``` + +#Alibaba Dragonwell +Alibaba Dragonwell, as a downstream version of OpenJDK, is the in-house OpenJDK implementation at Alibaba optimized for online e-commerce, financial, logistics applications running on 100,000+ servers. Alibaba Dragonwell is the engine that runs these distributed Java applications in extreme scaling. diff --git a/LANGUAGE/dragonwell/buildspec.yml b/LANGUAGE/dragonwell/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..4c7ed5ba95c182143ac6fa5f343dc831550ed721 --- /dev/null +++ b/LANGUAGE/dragonwell/buildspec.yml @@ -0,0 +1,35 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: + test: &DOCKERHUB_TEST registry.hub.docker.com/openanolis_test + prod: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: + test: &ACR_TEST anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + prod: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE ai-image-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildMariadbECSApplicationDockerImage: + # 定义是否构建参数 + build: true + docker_file: + path: LANGUAGE/dragonwell/8/8.6/Dockerfile + scene: + args: [ ] + tags: [[8.12.13-standard-ga-8.6-slim], [11-extended-ga-8.6]] + registry: [ *ACR_TEST, *ACR_PROD ] + # 测试配置 + test_config: [*WORKSPACE, *TEMPLATE] \ No newline at end of file diff --git a/LANGUAGE/dragonwell/version.yml b/LANGUAGE/dragonwell/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..3b9263e1d0fe2959d5e73c39195bd4897a9e2a92 --- /dev/null +++ b/LANGUAGE/dragonwell/version.yml @@ -0,0 +1,9 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: dragonwell + image_type: language + versions: + 8: + # 对 baseos 的要求,all 表示所有, Anolis8/[8.6,8.8] 表示Anolis8.6和8.8版本 + baseos_version: *AnolisOS8.6 diff --git a/LANGUAGE/golang/1.19.5/alinux3/Dockerfile b/LANGUAGE/golang/1.19.5/alinux3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..088ac6021504c26c349848756c994510fb4fe516 --- /dev/null +++ b/LANGUAGE/golang/1.19.5/alinux3/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3 + +FROM ${BASE_OS} as tire0 + +ARG TARGETPLATFORM + +RUN yum install -y tar wget + +RUN set -eux; \ + arch="$TARGETPLATFORM"; \ + url=; \ + case "$arch" in \ + 'linux/amd64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-amd64.tar.gz'; \ + sha256='36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95'; \ + ;; \ + 'linux/arm/v7') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + 'linux/arm64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$arch'"; exit 1 ;; \ + esac; \ + wget -O go.tgz "$url" --progress=dot:giga; \ + echo "$sha256 *go.tgz" | sha256sum -c -; \ + tar -C /usr/local -xzf /go.tgz + +FROM ${BASE_OS} + +# install cgo-related dependencies +RUN set -eux; \ + yum install -y gcc gcc-c++ glibc-devel make pkg-config; \ + yum clean all + +ENV PATH /usr/local/go/bin:$PATH + +ENV GOLANG_VERSION 1.19.5 + +COPY --from=tire0 /usr/local/go /usr/local/go + +RUN go version + +ENV GOPATH /go +ENV PATH $GOPATH/bin:$PATH +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH diff --git a/LANGUAGE/golang/1.19.5/anolis8.6/Dockerfile b/LANGUAGE/golang/1.19.5/anolis8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ae9a350df886378649042cd9a14bee27e20b394c --- /dev/null +++ b/LANGUAGE/golang/1.19.5/anolis8.6/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=openanolis/anolisos:8.6 + +FROM ${BASE_OS} as tire0 + +ARG TARGETPLATFORM + +RUN yum install -y tar wget + +RUN set -eux; \ + arch="$TARGETPLATFORM"; \ + url=; \ + case "$arch" in \ + 'linux/amd64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-amd64.tar.gz'; \ + sha256='36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95'; \ + ;; \ + 'linux/arm/v7') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + 'linux/arm64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$arch'"; exit 1 ;; \ + esac; \ + wget -O go.tgz "$url" --progress=dot:giga; \ + echo "$sha256 *go.tgz" | sha256sum -c -; \ + tar -C /usr/local -xzf /go.tgz + +FROM ${BASE_OS} + +# install cgo-related dependencies +RUN set -eux; \ + yum install -y gcc gcc-c++ glibc-devel make pkg-config; \ + yum clean all + +ENV PATH /usr/local/go/bin:$PATH + +ENV GOLANG_VERSION 1.19.5 + +COPY --from=tire0 /usr/local/go /usr/local/go + +RUN go version + +ENV GOPATH /go +ENV PATH $GOPATH/bin:$PATH +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH diff --git a/LANGUAGE/golang/1.19.5/anolis8.8/Dockerfile b/LANGUAGE/golang/1.19.5/anolis8.8/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2b3f948f15b02f0a4390e62cf2d46985be042458 --- /dev/null +++ b/LANGUAGE/golang/1.19.5/anolis8.8/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=openanolis/anolisos:8.8 + +FROM ${BASE_OS} as tire0 + +ARG TARGETPLATFORM + +RUN yum install -y tar wget + +RUN set -eux; \ + arch="$TARGETPLATFORM"; \ + url=; \ + case "$arch" in \ + 'linux/amd64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-amd64.tar.gz'; \ + sha256='36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95'; \ + ;; \ + 'linux/arm/v7') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + 'linux/arm64') \ + url='https://mirror.nju.edu.cn/golang/go1.19.5.linux-arm64.tar.gz'; \ + sha256='fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$arch'"; exit 1 ;; \ + esac; \ + wget -O go.tgz "$url" --progress=dot:giga; \ + echo "$sha256 *go.tgz" | sha256sum -c -; \ + tar -C /usr/local -xzf /go.tgz + +FROM ${BASE_OS} + +# install cgo-related dependencies +RUN set -eux; \ + yum install -y gcc gcc-c++ glibc-devel make pkg-config; \ + yum clean all + +ENV PATH /usr/local/go/bin:$PATH + +ENV GOLANG_VERSION 1.19.5 + +COPY --from=tire0 /usr/local/go /usr/local/go + +RUN go version + +ENV GOPATH /go +ENV PATH $GOPATH/bin:$PATH +RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" +WORKDIR $GOPATH diff --git a/LANGUAGE/golang/buildspec.yml b/LANGUAGE/golang/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..ebaefb600e9e2f37fb40b0c1581461a11f57a6f3 --- /dev/null +++ b/LANGUAGE/golang/buildspec.yml @@ -0,0 +1,35 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: + test: &DOCKERHUB_TEST registry.hub.docker.com/openanolis_test + prod: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: + test: &ACR_TEST anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + prod: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE ai-image-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildGolangECSApplicationDockerImage: + # 定义是否构建参数 + build: true + docker_file: + path: LANGUAGE/golang/1.19.5/anolis8.6/Dockerfile + scene: + args: [ ] + tags: [ [ 1.19.5-8.6, 1.19.5-nydus ] ] + registry: [ [ *ACR_TEST ] ] + # 测试配置 + test_config: [[*WORKSPACE, *TEMPLATE]] \ No newline at end of file diff --git a/LANGUAGE/golang/test-image/Dockerfile b/LANGUAGE/golang/test-image/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d5d5d2a4914280dee3fd4c0f6a843e51b3c3193a --- /dev/null +++ b/LANGUAGE/golang/test-image/Dockerfile @@ -0,0 +1,23 @@ +ARG BUILDER=anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/golang:1.19.5-8.6 + +FROM ${BUILDER} as builder + +ARG CACHEBUST=1 + +# check version +RUN if [[ "$(go version)" != "go version go${GOLANG_VERSION}"* ]]; then \ + echo >&2 "error: Golang version should start with 'go version go${GOLANG_VERSION}', got '$(go version)'"; \ + exit 1; \ + fi; + +# RUN yum install -y git +# RUN git clone https://github.com/golang/go.git -b go${GOLANG_VERSION} + +# golang tests +RUN cd /usr/local/go/src && \ + go tool dist test -rebuild -run="!syscall" + +# Note: +# +# https://github.com/golang/go/commit/092671423cd95eaa6df93eb29442fef41504d097 +# This patch doesn't get integrated into 1.19.5, so TestUnshareMountNameSpace etc. would fail. diff --git a/LANGUAGE/golang/version.yml b/LANGUAGE/golang/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..d02ed4f749cde83288558fec27f8575aab16d99f --- /dev/null +++ b/LANGUAGE/golang/version.yml @@ -0,0 +1,9 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: golang + image_type: language + versions: + 1.19.5: + # 对 baseos 的要求,all 表示所有, Anolis8/[8.6,8.8] 表示Anolis8.6和8.8版本 + baseos_version: [*AnolisOS8.6, *AnolisOS8.8, *Alinux3] diff --git a/LANGUAGE/golang/versions.yaml b/LANGUAGE/golang/versions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3b09a0f756692017384d6bb30653c13efaec4349 --- /dev/null +++ b/LANGUAGE/golang/versions.yaml @@ -0,0 +1,24 @@ +golang: + 1.19.5: + anolis: + registries: + - anolis + images: + - dockerfile: golang/1.19.5/anolis8.6/Dockerfile + builds: + - tags: + - 1.19.5-8.6 + - dockerfile: golang/1.19.5/anolis8.8/Dockerfile + builds: + - tags: + - 1.19.5-8.8 + - latest + alinux: + registries: + - alinux + images: + - dockerfile: golang/1.19.5/alinux3/Dockerfile + builds: + - tags: + - 1.19.5-3 + - latest diff --git a/LANGUAGE/node/16.17.1-nslt/alinux3/Dockerfile b/LANGUAGE/node/16.17.1-nslt/alinux3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e1e5aa0d861594f3a8193e53a85fd615bb408aa7 --- /dev/null +++ b/LANGUAGE/node/16.17.1-nslt/alinux3/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3 + +FROM ${BASE_OS} as builder + +RUN yum install -y tar xz + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG NODE_NAME=node-v${NODE_VERSION} +ARG YARN_NAME=yarn-v${YARN_VERSION} + +ARG NODE_SRC_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/node-v${NODE_VERSION}.tar.xz +ARG NODE_SRC_SHA256="00a65f7c2cbcc2dcbb6f8fc1d6acae673360ca1cb5ae09cb4ff36f8446bca4d3" +ARG YARN_BIN_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/yarn-v${YARN_VERSION}.tar.gz +ARG YARN_BIN_SHA256="732620bac8b1690d507274f025f3c6cfdc3627a84d9642e38a07452cc00e0f2e" + +RUN curl -LfsSo /${NODE_NAME}.tar.xz ${NODE_SRC_URL}; \ + echo "${NODE_SRC_SHA256} /${NODE_NAME}.tar.xz" | sha256sum -c -; \ + tar xf /${NODE_NAME}.tar.xz; +WORKDIR /${NODE_NAME} + +RUN yum install -y python3 gcc-c++ make + +RUN ./configure --prefix=/node; \ + make -j4 install; + +ARG NODE_NAME=node-${NODE_VERSION} + +RUN curl -LfsSo ${YARN_NAME}.tar.gz ${YARN_BIN_URL}; \ + echo "${YARN_BIN_SHA256} ${YARN_NAME}.tar.gz" | sha256sum -c -; \ + rm -rf /opt && mkdir /opt; \ + tar -xzf ${YARN_NAME}.tar.gz -C /opt/; + +FROM ${BASE_OS} + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG YARN_NAME=yarn-v${YARN_VERSION} + +RUN groupadd -g 1000 node \ + && adduser -u 1000 -g node -s /bin/sh node + +COPY --from=builder /node /usr/local +COPY --from=builder /opt /opt + +RUN ln -s /opt/${YARN_NAME}/bin/yarn /usr/local/bin/yarn \ + && ln -s /opt/${YARN_NAME}/bin/yarnpkg /usr/local/bin/yarnpkg + +USER node diff --git a/LANGUAGE/node/16.17.1-nslt/anolis8.6/Dockerfile b/LANGUAGE/node/16.17.1-nslt/anolis8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5be251856763cb36a326c85b78c40faf335acc19 --- /dev/null +++ b/LANGUAGE/node/16.17.1-nslt/anolis8.6/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=openanolis/anolisos:8.6 + +FROM ${BASE_OS} as builder + +RUN yum install -y tar xz + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG NODE_NAME=node-v${NODE_VERSION} +ARG YARN_NAME=yarn-v${YARN_VERSION} + +ARG NODE_SRC_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/node-v${NODE_VERSION}.tar.xz +ARG NODE_SRC_SHA256="00a65f7c2cbcc2dcbb6f8fc1d6acae673360ca1cb5ae09cb4ff36f8446bca4d3" +ARG YARN_BIN_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/yarn-v${YARN_VERSION}.tar.gz +ARG YARN_BIN_SHA256="732620bac8b1690d507274f025f3c6cfdc3627a84d9642e38a07452cc00e0f2e" + +RUN curl -LfsSo /${NODE_NAME}.tar.xz ${NODE_SRC_URL}; \ + echo "${NODE_SRC_SHA256} /${NODE_NAME}.tar.xz" | sha256sum -c -; \ + tar xf /${NODE_NAME}.tar.xz; +WORKDIR /${NODE_NAME} + +RUN yum install -y python3 gcc-c++ make + +RUN ./configure --prefix=/node; \ + make -j4 install; + +ARG NODE_NAME=node-${NODE_VERSION} + +RUN curl -LfsSo ${YARN_NAME}.tar.gz ${YARN_BIN_URL}; \ + echo "${YARN_BIN_SHA256} ${YARN_NAME}.tar.gz" | sha256sum -c -; \ + rm -rf /opt && mkdir /opt; \ + tar -xzf ${YARN_NAME}.tar.gz -C /opt/; + +FROM ${BASE_OS} + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG YARN_NAME=yarn-v${YARN_VERSION} + +RUN groupadd -g 1000 node \ + && adduser -u 1000 -g node -s /bin/sh node + +COPY --from=builder /node /usr/local +COPY --from=builder /opt /opt + +RUN ln -s /opt/${YARN_NAME}/bin/yarn /usr/local/bin/yarn \ + && ln -s /opt/${YARN_NAME}/bin/yarnpkg /usr/local/bin/yarnpkg + +USER node diff --git a/LANGUAGE/node/16.17.1-nslt/anolis8.8/Dockerfile b/LANGUAGE/node/16.17.1-nslt/anolis8.8/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..bdfc779e43ab9eef268280f7200b6883430dea98 --- /dev/null +++ b/LANGUAGE/node/16.17.1-nslt/anolis8.8/Dockerfile @@ -0,0 +1,49 @@ +ARG BASE_OS=openanolis/anolisos:8.8 + +FROM ${BASE_OS} as builder + +RUN yum install -y tar xz + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG NODE_NAME=node-v${NODE_VERSION} +ARG YARN_NAME=yarn-v${YARN_VERSION} + +ARG NODE_SRC_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/node-v${NODE_VERSION}.tar.xz +ARG NODE_SRC_SHA256="00a65f7c2cbcc2dcbb6f8fc1d6acae673360ca1cb5ae09cb4ff36f8446bca4d3" +ARG YARN_BIN_URL=https://language-containers.oss-cn-hangzhou.aliyuncs.com/node/yarn-v${YARN_VERSION}.tar.gz +ARG YARN_BIN_SHA256="732620bac8b1690d507274f025f3c6cfdc3627a84d9642e38a07452cc00e0f2e" + +RUN curl -LfsSo /${NODE_NAME}.tar.xz ${NODE_SRC_URL}; \ + echo "${NODE_SRC_SHA256} /${NODE_NAME}.tar.xz" | sha256sum -c -; \ + tar xf /${NODE_NAME}.tar.xz; +WORKDIR /${NODE_NAME} + +RUN yum install -y python3 gcc-c++ make + +RUN ./configure --prefix=/node; \ + make -j4 install; + +ARG NODE_NAME=node-${NODE_VERSION} + +RUN curl -LfsSo ${YARN_NAME}.tar.gz ${YARN_BIN_URL}; \ + echo "${YARN_BIN_SHA256} ${YARN_NAME}.tar.gz" | sha256sum -c -; \ + rm -rf /opt && mkdir /opt; \ + tar -xzf ${YARN_NAME}.tar.gz -C /opt/; + +FROM ${BASE_OS} + +ENV NODE_VERSION 16.17.1 +ENV YARN_VERSION 1.22.19 +ARG YARN_NAME=yarn-v${YARN_VERSION} + +RUN groupadd -g 1000 node \ + && adduser -u 1000 -g node -s /bin/sh node + +COPY --from=builder /node /usr/local +COPY --from=builder /opt /opt + +RUN ln -s /opt/${YARN_NAME}/bin/yarn /usr/local/bin/yarn \ + && ln -s /opt/${YARN_NAME}/bin/yarnpkg /usr/local/bin/yarnpkg + +USER node diff --git a/LANGUAGE/node/buildspec.yml b/LANGUAGE/node/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..a3fe0fc686a532595d1e6185cb339acfa401c252 --- /dev/null +++ b/LANGUAGE/node/buildspec.yml @@ -0,0 +1,35 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: + test: &DOCKERHUB_TEST registry.hub.docker.com/openanolis_test + prod: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: + test: &ACR_TEST anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + prod: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE ai-image-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildGolangECSApplicationDockerImage: + # 定义是否构建参数 + build: true + docker_file: + path: LANGUAGE/node/16.17.1-nslt/anolis8.6/Dockerfile + scene: + args: [ ] + tags: [ [ 16.17.1-nslt-8.6, 16.17.1-nslt-8.6-nydus ] ] + registry: [ [ *ACR_TEST ] ] + # 测试配置 + test_config: [*WORKSPACE, *TEMPLATE] \ No newline at end of file diff --git a/LANGUAGE/node/test-image/Dockerfile b/LANGUAGE/node/test-image/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..eb5fd2a17428eb8504e302d26819af665166e67f --- /dev/null +++ b/LANGUAGE/node/test-image/Dockerfile @@ -0,0 +1,23 @@ +ARG BUILDER=anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/node:16.17.1-nslt-8.6 + +FROM ${BUILDER} as builder + +ARG CACHEBUST=1 + +USER root + +# check version +RUN if [[ "$(node --version)" != "v${NODE_VERSION}" ]]; then \ + echo >&2 "error: Node version should be 'v${NODE_VERSION}', got '$(node --version)'"; \ + exit 1; \ + fi; + +RUN yum install -y git python3 procps +RUN ln -s /usr/bin/python3 /usr/bin/python + +RUN git clone https://github.com/nodejs/node.git -b v${NODE_VERSION} + +# node tests +RUN cd node && \ + python3 tools/test.py --shell /usr/local/bin/node --skip-tests=test-child-process-stdio-overlapped,test-process-config,test-cluster-primary-error,test-cluster-primary-kill + diff --git a/LANGUAGE/node/version.yml b/LANGUAGE/node/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..452bff8306ee0bf66f392c0ccf6dc748d555914c --- /dev/null +++ b/LANGUAGE/node/version.yml @@ -0,0 +1,9 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: node + image_type: language + versions: + 16.17.1-nslt: + # 对 baseos 的要求,all 表示所有, Anolis8/[8.6,8.8] 表示Anolis8.6和8.8版本 + baseos_version: [*AnolisOS8.6, *AnolisOS8.8, *Alinux3] diff --git a/LANGUAGE/node/versions.yaml b/LANGUAGE/node/versions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e7c6149c24271aa488afeb12b590c4d3ef32b144 --- /dev/null +++ b/LANGUAGE/node/versions.yaml @@ -0,0 +1,24 @@ +node: + 16.17.1-nslt: + anolis: + registries: + - anolis + images: + - dockerfile: node/16.17.1-nslt/anolis8.6/Dockerfile + builds: + - tags: + - 16.17.1-nslt-8.6 + - dockerfile: node/16.17.1-nslt/anolis8.8/Dockerfile + builds: + - tags: + - 16.17.1-nslt-8.8 + - latest + alinux: + registries: + - alinux + images: + - dockerfile: node/16.17.1-nslt/alinux3/Dockerfile + builds: + - tags: + - 16.17.1-nslt-3 + - latest diff --git a/LANGUAGE/python/3.11.1/alinux3/Dockerfile b/LANGUAGE/python/3.11.1/alinux3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ece01a2b4561b21198216982584b08eee2fda22b --- /dev/null +++ b/LANGUAGE/python/3.11.1/alinux3/Dockerfile @@ -0,0 +1,64 @@ +ARG BASE_OS=alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3 + +FROM ${BASE_OS} + +RUN yum install -y tar xz wget \ + findutils make gcc gcc-c++ \ + openssl-devel bzip2-devel libffi-devel libuuid-devel sqlite-devel gdbm-devel expat-devel ncurses-devel xz-devel readline-devel tk-devel && \ + yum clean all + +ENV PYTHON_VERSION 3.11.1 +ENV PYTHON_PIP_VERSION 22.3.1 +ENV PYTHON_SETUPTOOLS_VERSION 65.5.0 + +RUN set -eux; \ + url="https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ + _md5='5c986b2865979b393aa50a31c65b64e8'; \ + wget -O "Python-${PYTHON_VERSION}.tar.xz" "$url"; \ + tar xf "Python-${PYTHON_VERSION}.tar.xz" && cd "/Python-${PYTHON_VERSION}" && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-lto \ + --with-system-expat \ + --without-ensurepip && \ + make -j4 && \ + make install && \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ + \) -exec rm -rf '{}' + \ + ; \ + \ + rm -rf /Python* && \ + echo '/usr/local/lib' >> /etc/ld.so.conf && ldconfig && \ + python3 --version + +RUN set -eux; \ + for src in idle3 pydoc3 python3 python3-config; do \ + dst="$(echo "$src" | tr -d 3)"; \ + [ -s "/usr/local/bin/$src" ]; \ + [ ! -e "/usr/local/bin/$dst" ]; \ + ln -svT "$src" "/usr/local/bin/$dst"; \ + done + +RUN curl -LfsSo /get-pip.py https://bootstrap.pypa.io/get-pip.py + +RUN set -eux; \ + \ + export PYTHONDONTWRITEBYTECODE=1; \ + \ + python3 get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + ; \ + rm -f get-pip.py; \ + \ + pip --version + +CMD ["python3"] diff --git a/LANGUAGE/python/3.11.1/anolis8.6/Dockerfile b/LANGUAGE/python/3.11.1/anolis8.6/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3dfb2fa79108a5435515a0abb7663543609ac883 --- /dev/null +++ b/LANGUAGE/python/3.11.1/anolis8.6/Dockerfile @@ -0,0 +1,64 @@ +ARG BASE_OS=openanolis/anolisos:8.6 + +FROM ${BASE_OS} + +RUN yum install -y tar xz wget \ + findutils make gcc gcc-c++ \ + openssl-devel bzip2-devel libffi-devel libuuid-devel sqlite-devel gdbm-devel expat-devel ncurses-devel xz-devel readline-devel tk-devel && \ + yum clean all + +ENV PYTHON_VERSION 3.11.1 +ENV PYTHON_PIP_VERSION 22.3.1 +ENV PYTHON_SETUPTOOLS_VERSION 65.5.0 + +RUN set -eux; \ + url="https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ + _md5='5c986b2865979b393aa50a31c65b64e8'; \ + wget -O "Python-${PYTHON_VERSION}.tar.xz" "$url"; \ + tar xf "Python-${PYTHON_VERSION}.tar.xz" && cd "/Python-${PYTHON_VERSION}" && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-lto \ + --with-system-expat \ + --without-ensurepip && \ + make -j4 && \ + make install && \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ + \) -exec rm -rf '{}' + \ + ; \ + \ + rm -rf /Python* && \ + echo '/usr/local/lib' >> /etc/ld.so.conf && ldconfig && \ + python3 --version + +RUN set -eux; \ + for src in idle3 pydoc3 python3 python3-config; do \ + dst="$(echo "$src" | tr -d 3)"; \ + [ -s "/usr/local/bin/$src" ]; \ + [ ! -e "/usr/local/bin/$dst" ]; \ + ln -svT "$src" "/usr/local/bin/$dst"; \ + done + +RUN curl -LfsSo /get-pip.py https://bootstrap.pypa.io/get-pip.py + +RUN set -eux; \ + \ + export PYTHONDONTWRITEBYTECODE=1; \ + \ + python3 get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + ; \ + rm -f get-pip.py; \ + \ + pip --version + +CMD ["python3"] diff --git a/LANGUAGE/python/3.11.1/anolis8.8/Dockerfile b/LANGUAGE/python/3.11.1/anolis8.8/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..462d5209e1f31baf69bf5b4c2867bb822110629b --- /dev/null +++ b/LANGUAGE/python/3.11.1/anolis8.8/Dockerfile @@ -0,0 +1,64 @@ +ARG BASE_OS=openanolis/anolisos:8.8 + +FROM ${BASE_OS} + +RUN yum install -y tar xz wget \ + findutils make gcc gcc-c++ \ + openssl-devel bzip2-devel libffi-devel libuuid-devel sqlite-devel gdbm-devel expat-devel ncurses-devel xz-devel readline-devel tk-devel && \ + yum clean all + +ENV PYTHON_VERSION 3.11.1 +ENV PYTHON_PIP_VERSION 22.3.1 +ENV PYTHON_SETUPTOOLS_VERSION 65.5.0 + +RUN set -eux; \ + url="https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ + _md5='5c986b2865979b393aa50a31c65b64e8'; \ + wget -O "Python-${PYTHON_VERSION}.tar.xz" "$url"; \ + tar xf "Python-${PYTHON_VERSION}.tar.xz" && cd "/Python-${PYTHON_VERSION}" && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-optimizations \ + --enable-option-checking=fatal \ + --enable-shared \ + --with-lto \ + --with-system-expat \ + --without-ensurepip && \ + make -j4 && \ + make install && \ + find /usr/local -depth \ + \( \ + \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ + -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ + \) -exec rm -rf '{}' + \ + ; \ + \ + rm -rf /Python* && \ + echo '/usr/local/lib' >> /etc/ld.so.conf && ldconfig && \ + python3 --version + +RUN set -eux; \ + for src in idle3 pydoc3 python3 python3-config; do \ + dst="$(echo "$src" | tr -d 3)"; \ + [ -s "/usr/local/bin/$src" ]; \ + [ ! -e "/usr/local/bin/$dst" ]; \ + ln -svT "$src" "/usr/local/bin/$dst"; \ + done + +RUN curl -LfsSo /get-pip.py https://bootstrap.pypa.io/get-pip.py + +RUN set -eux; \ + \ + export PYTHONDONTWRITEBYTECODE=1; \ + \ + python3 get-pip.py \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + ; \ + rm -f get-pip.py; \ + \ + pip --version + +CMD ["python3"] diff --git a/LANGUAGE/python/buildspec.yml b/LANGUAGE/python/buildspec.yml new file mode 100644 index 0000000000000000000000000000000000000000..b0ad3e3a4c23c551e3e63870c45f0b9f525026c5 --- /dev/null +++ b/LANGUAGE/python/buildspec.yml @@ -0,0 +1,32 @@ +name: &NAME +version: &VERSION +image_type: &IMAGE_TYPE +baseos_version: &BASEOS_VERSION + +# 定义镜像仓库信息,当需要推送多个镜像地址时:仓库地址,仓库名可填写多个,用英文逗号分隔 +repository_info: + # 支持定义多个,用英文逗号分隔,多个引用时 *REPOSITORY_TEST 代表一个数组,*REPOSITORY_TEST[i] 代表具体的值 + dockerhub: &DOCKERHUB_PROD registry.hub.docker.com/openanolis + acr: &ACR_PROD anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/anolis-docker-images + +# 定义镜像测试信息 +t-one: + # 配置测试信息 workspace 和模版 + workspace: &WORKSPACE common_workspace + template: &TEMPLATE ai-image-test + +# 构建镜像配置 +images: + # 分组名称,支持自定义 + BuildGolangECSApplicationDockerImage: + # 定义是否构建参数 + build: true + test: false + docker_file: + path: LANGUAGE/python/3.11.1/anolis8.6/Dockerfile + scene: + args: [ ] + tags: [ [ 3.11.1-8.6, 3.11.1-8.6-nydus ] ] + registry: [ [ *ACR_PROD ] ] + # 测试配置 + test_config: [*WORKSPACE, *TEMPLATE] \ No newline at end of file diff --git a/LANGUAGE/python/test-image/Dockerfile b/LANGUAGE/python/test-image/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5ddad59ad5824167c5c08959dac2469961156167 --- /dev/null +++ b/LANGUAGE/python/test-image/Dockerfile @@ -0,0 +1,31 @@ +ARG BUILDER=anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/python:3.11.1-8.6 + +FROM ${BUILDER} as builder + +ARG CACHEBUST=1 + +# check version +RUN if [ "$(python --version)" != "Python ${PYTHON_VERSION}" ]; then \ + echo >&2 "error: Python version should be 'Python ${PYTHON_VERSION}', got '$(python --version)'"; \ + exit 1; \ + fi; + +RUN yum install -y git + +RUN git clone https://github.com/python/cpython.git -b v${PYTHON_VERSION} + +# python tests +RUN cd cpython && \ + cp -r Lib/test /usr/local/lib/python* && \ + cp -r Lib/unittest/test /usr/local/lib/python*/unittest && \ + cp -r Lib/distutils/tests /usr/local/lib/python*/distutils && \ + cp -r Lib/idlelib/idle_test /usr/local/lib/python*/idlelib && \ + cp -r Lib/lib2to3/tests /usr/local/lib/python*/lib2to3/ && \ + cd /usr/local/lib/python* && \ + python -m test -x test_minidom -x test_venv + +# Note: +# test_minidom needs Expat >= 2.4.5. But anolis only supports Expat 2.2.5 for now. +# See: https://github.com/python/cpython/pull/31453/files: +# Quote: "Make test suite support Expat >=2.4.5" + diff --git a/LANGUAGE/python/version.yml b/LANGUAGE/python/version.yml new file mode 100644 index 0000000000000000000000000000000000000000..c9c646c17d79c01dbbc2bae38aa8f2bbaeef03bb --- /dev/null +++ b/LANGUAGE/python/version.yml @@ -0,0 +1,9 @@ +# 版本关系依赖表,默认继承 version-base.yml 配置,可重写覆盖 +BaseDependency: ../version-base.yml +Dependency: + name: python + image_type: language + versions: + 3.11.1: + # 对 baseos 的要求,all 表示所有, Anolis8/[8.6,8.8] 表示Anolis8.6和8.8版本 + baseos_version: [*AnolisOS8.6, *AnolisOS8.8, *Alinux3] diff --git a/LANGUAGE/python/versions.yaml b/LANGUAGE/python/versions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..609f9850a959dbc03246512c85dbb9faa127ef92 --- /dev/null +++ b/LANGUAGE/python/versions.yaml @@ -0,0 +1,24 @@ +python: + 3.11.1: + anolis: + registries: + - anolis + images: + - dockerfile: python/3.11.1/anolis8.6/Dockerfile + builds: + - tags: + - 3.11.1-8.6 + - dockerfile: python/3.11.1/anolis8.8/Dockerfile + builds: + - tags: + - 3.11.1-8.8 + - latest + alinux: + registries: + - alinux + images: + - dockerfile: python/3.11.1/alinux3/Dockerfile + builds: + - tags: + - 3.11.1-3 + - latest diff --git a/version-base.yml b/version-base.yml new file mode 100644 index 0000000000000000000000000000000000000000..9f98efda83e1c039e4c7172cf6162b73069f553c --- /dev/null +++ b/version-base.yml @@ -0,0 +1,16 @@ +# 版本关系依赖表 +Dependency: + AnolisOS: + Anolis7: # baseos 表示一个字符串,并使用 [baseos 名称, 版本, 公网地址] + 7: &AnolisOS7 [anolisos, 7, registry.openanolis.cn/openanolis/anolisos:7] + Anolis8: + 8.4: &AnolisOS8.4 [anolisos, 8.4, registry.openanolis.cn/openanolis/anolisos:8.4] + 8.6: &AnolisOS8.6 [anolisos, 8.6, registry.openanolis.cn/openanolis/anolisos:8.6] + 8.8: &AnolisOS8.8 [anolisos, 8.8, registry.openanolis.cn/openanolis/anolisos:8.8] + Anolis23: + 23: &AnolisOS23 [anolisos, 23, registry.openanolis.cn/openanolis/anolisos:23] + ALinux: + Alinux2: + 2: &Alinux2 [alinux, 2, alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:220901.1] + Alinux3: + 3.7: &Alinux3 [alinux, 3, alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:220901.1] \ No newline at end of file