docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.19k stars 1.14k forks source link

Execute docker build -t postgres:14.2_alpine ., and finally report the following error. #988

Closed luomengY closed 2 years ago

luomengY commented 2 years ago
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/main: network connection aborted
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.16/community: network error (check Internet connection and firewall)
ERROR: unable to select packages:
  bash-5.1.16-r2:
    masked in: --no-network
    satisfies: .postgresql-rundeps-20220822.062428[bash]
  su-exec-0.2-r1:
    masked in: --no-network
    satisfies: .postgresql-rundeps-20220822.062428[su-exec]
  tzdata-2022c-r0:
    masked in: --no-network
    satisfies: .postgresql-rundeps-20220822.062428[tzdata]
  zstd-1.5.2-r1:
    masked in: --no-network
    satisfies: .postgresql-rundeps-20220822.062428[zstd]
  .postgresql-rundeps-20220822.062428:
    masked in: cache
    satisfies: world[.postgresql-rundeps=20220822.062428]
  icu-data-full (no such package):
    required by: .postgresql-rundeps-20220822.062428[icu-data-full]
The command '/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;      apk add --no-cache --virtual .build-depsbison       coreutils       dpkg-dev dpkg       flex        gcc         krb5-dev        libc-dev        libedit-dev         libxml2-dev         libxslt-dev         linux-headers       llvm-dev clang g++      make        openldap-dev        openssl-dev         perl-dev        perl-ipc-run        perl-utils      python3-dev         tcl-dev         util-linux-dev      zlib-dev        icu-dev         lz4-dev         zstd-dev    ;       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/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb';  wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb';  ./configure         --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-krb5         --with-gssapi   --with-ldap         --with-tcl      --with-perl         --with-python       --with-openssl      --with-libxml       --with-libxslt      --with-icu      --with-llvm         --with-lz4      --with-zstd     ;   make -j "$(nproc)" world;   make install-world;     make -C contrib install;        runDeps="$(         scanelf --needed --nobanner --format '%n#p' --recursive /usr/local          | tr ',' '\n'           | sort -u           | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }'             | grep -v -e perl -e python -e tcl  )";     apk add --no-cache --virtual .postgresql-rundeps        $runDeps        bash        su-exec         tzdata      zstd        icu-data-full   ;   apk del --no-network .build-deps;   cd /;   rm -rf      /usr/src/postgresql         /usr/local/share/doc        /usr/local/share/man    ;       postgres --version' returned a non-zero code: 6
wglambert commented 2 years ago

If you wanted to make a derivative Dockerfile of the already-built image you can do FROM postgres. But your build ran into a network issue, probably intermittent I would try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow. Since these repos aren't really a user-help forum