Loongson-Cloud-Community / dockerfiles

14 stars 14 forks source link

fix: postgres 13 and postgis 13 #165

Closed znley closed 8 months ago

qiangxuhui commented 8 months ago
code level alerts
0 DKL-DI-0005 FATAL Use 'rm -rf /var/lib/apt/lists' after 'apt-get install update' : 0 /bin/sh -c set -eux; wget -O postgresql.tar.bz2 "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2"; echo "$PG_SHA256 *postgresql.tar.bz2" sha256sum -c -; mkdir -p /usr/src/postgresql; tar --extract --file postgresql.tar.bz2 --directory /usr/src/postgresql --strip-components 1 ; rm postgresql.tar.bz2; cd /usr/src/postgresql; awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new; grep '/var/run/postgresql' src/include/pg_config_manual.h.new; mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; wget -O config/config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'; wget -O config/config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'; export LLVM_CONFIG=$LLVM_CONFIG_PATH; export CLANG=$CLANG_VERSION; ./configure --enable-option-checking=fatal --build="$gnuArch" --enable-integer-datetimes --enable-thread-safety --enable-tap-tests --disable-rpath --with-uuid=e2fs --with-gnu-ld --with-pgport=5432 --with-system-tzdata=/usr/share/zoneinfo --prefix=/usr/local --with-includes=/usr/local/include --with-libraries=/usr/local/lib --with-gssapi --with-ldap --with-tcl --with-perl --with-python --with-openssl --with-libxml --with-libxslt --with-icu --with-llvm ; make -j "$(nproc)" world; make install-world; make -C contrib install; apt-get install -y tzdata zstd ; cd /; rm -rf /usr/src/postgresql /usr/local/share/doc /usr/local/share/man ; echo '{"spdxVersion":"SPDX-2.3","SPDXID":"SPDXRef-DOCUMENT","name":"postgres-sbom","packages":[{"name":"postgres","versionInfo":"13.13","SPDXID":"SPDXRef-Package--postgres","externalRefs":[{"referenceCategory":"PACKAGE-MANAGER","referenceType":"purl","referenceLocator":"pkg:generic/postgres@13.13?os_name=alpine&os_version=3.17"}],"licenseDeclared":"PostgreSQL"}]}' > /usr/local/postgres.spdx.json ; postgres --version
1 CIS-DI-0001 WARN Last user should not be root
2 CIS-DI-0005 INFO export DOCKER_CONTENT_TRUST=1 before docker pull/build
3 CIS-DI-0006 INFO not found HEALTHCHECK statement
4 CIS-DI-0008 INFO setuid file: urwxr-xr-x usr/bin/newgrp
qiangxuhui commented 8 months ago
code level alerts
0 DKL-DI-0005 FATAL Use 'rm -rf /var/lib/apt/lists' after 'apt-get install update' : 0 /bin/sh -c apt-get update; apt-get install -y $DOCKER_PG_LLVM_DEPS bison coreutils dpkg-dev dpkg flex g++ gcc libkrb5-dev libc-dev libedit-dev libxml2-dev libxslt1-dev make golang-openldap-dev openssl libperl-dev perl python3-dev tcl-dev util-linux zlib1g-dev libicu-dev libssl-dev uuid-dev libipc-run-perl pax-utils wget pkg-config
1 CIS-DI-0001 WARN Last user should not be root
2 CIS-DI-0005 INFO export DOCKER_CONTENT_TRUST=1 before docker pull/build
3 CIS-DI-0006 INFO not found HEALTHCHECK statement
4 CIS-DI-0008 INFO setuid file: urwxr-xr-x usr/bin/newgrp
qiangxuhui commented 8 months ago
[
  "cr.loongnix.cn/postgis/postgis:13-3.4"
]

@zhaixiaojuan @znley

qiangxuhui commented 8 months ago
code level alerts
0 DKL-DI-0005 FATAL Use 'rm -rf /var/lib/apt/lists' after 'apt-get install update' : 0 /bin/sh -c apt-get update; apt-get install -y $DOCKER_PG_LLVM_DEPS bison coreutils dpkg-dev dpkg flex g++ gcc libkrb5-dev libc-dev libedit-dev libxml2-dev libxslt1-dev make golang-openldap-dev openssl libperl-dev perl python3-dev tcl-dev util-linux zlib1g-dev libicu-dev libssl-dev uuid-dev libipc-run-perl pax-utils wget pkg-config
1 CIS-DI-0001 WARN Last user should not be root
2 CIS-DI-0005 INFO export DOCKER_CONTENT_TRUST=1 before docker pull/build
3 CIS-DI-0006 INFO not found HEALTHCHECK statement
4 CIS-DI-0008 INFO setgid file: grwxr-xr-x usr/bin/expiry
qiangxuhui commented 8 months ago
[
  "cr.loongnix.cn/postgis/postgis:13-3.4"
]

@zhaixiaojuan @znley

qiangxuhui commented 8 months ago
code level alerts
0 DKL-DI-0005 FATAL Use 'rm -rf /var/lib/apt/lists' after 'apt-get install update' : 0 /bin/sh -c apt-get -y install locales; echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; locale-gen; ldconfig
1 CIS-DI-0001 WARN Last user should not be root
2 CIS-DI-0005 INFO export DOCKER_CONTENT_TRUST=1 before docker pull/build
3 CIS-DI-0006 INFO not found HEALTHCHECK statement
4 CIS-DI-0008 INFO setuid file: urwxr-xr-x usr/bin/umount