diff --git a/3.7/Dockerfile b/3.7/Dockerfile index 6f4c9ff580..a2e62933cb 100644 --- a/3.7/Dockerfile +++ b/3.7/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:jessie-slim +FROM ubuntu:xenial # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN groupadd -r mongodb && useradd -r -g mongodb mongodb @@ -66,7 +66,7 @@ ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO} ENV MONGO_MAJOR 3.7 ENV MONGO_VERSION 3.7.9 -RUN echo "deb http://$MONGO_REPO/apt/debian jessie/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR main" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" +RUN echo "deb http://$MONGO_REPO/apt/ubuntu xenial/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR multiverse" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" RUN set -x \ && apt-get update \ diff --git a/4.0-rc/Dockerfile b/4.0-rc/Dockerfile index 13975b0145..d42ff6ebda 100644 --- a/4.0-rc/Dockerfile +++ b/4.0-rc/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:jessie-slim +FROM ubuntu:xenial # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added RUN groupadd -r mongodb && useradd -r -g mongodb mongodb @@ -66,7 +66,7 @@ ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO} ENV MONGO_MAJOR testing ENV MONGO_VERSION 4.0.0~rc0 -RUN echo "deb http://$MONGO_REPO/apt/debian jessie/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR main" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" +RUN echo "deb http://$MONGO_REPO/apt/ubuntu xenial/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR multiverse" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" RUN set -x \ && apt-get update \ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 33a62bd1e5..83e1d48a8f 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -71,18 +71,34 @@ for version in "${versions[@]}"; do ${aliases[$version]:-} ) - variant="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "FROM" { gsub(/^.*:|-.*$/, "", $2); print $2; exit }')" + from="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "FROM" { print $2; exit }')" + distro="${from%%:*}" # "debian", "ubuntu" + suite="${from#$distro:}" # "jessie-slim", "xenial" + suite="${suite%-slim}" # "jessie", "xenial" + + component='multiverse' + if [ "$distro" = 'debian' ]; then + component='main' + fi + variant="$suite" variantAliases=( "${versionAliases[@]/%/-$variant}" ) variantAliases=( "${variantAliases[@]//latest-/}" ) + major="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "ENV" && $2 == "MONGO_MAJOR" { print $3 }')" + + variantArches=( amd64 ) + if [ "$distro" = 'ubuntu' ]; then + variantArches+=( arm64v8 ) + fi + echo cat <<-EOE Tags: $(join ', ' "${variantAliases[@]}") SharedTags: $(join ', ' "${versionAliases[@]}") - # see http://repo.mongodb.org/apt/debian/dists/$variant/mongodb-org/${version}/main/ - # (i386 is empty, as is ppc64el) - Architectures: amd64 + # see http://repo.mongodb.org/apt/$distro/dists/$suite/mongodb-org/$major/$component/ + # (i386, ppc64el, s390x are empty) + Architectures: $(join ', ' "${variantArches[@]}") GitCommit: $commit Directory: $version EOE diff --git a/update.sh b/update.sh index ca4bafee31..425018c14b 100755 --- a/update.sh +++ b/update.sh @@ -24,10 +24,16 @@ for version in "${versions[@]}"; do fi from="$(gawk -F '[[:space:]]+' 'toupper($1) == "FROM" { print $2; exit }' "$version/Dockerfile")" # "debian:xxx" - suite="${from#*:}" # "wheezy-slim" or "jessie-slim" - suite="${suite%-slim}" # "wheezy" or "jessie" + distro="${from%%:*}" # "debian", "ubuntu" + suite="${from#$distro:}" # "jessie-slim", "xenial" + suite="${suite%-slim}" # "jessie", "xenial" - packagesUrl="https://repo.mongodb.org/apt/debian/dists/$suite/mongodb-org/$major/main/binary-amd64/Packages" + component='multiverse' + if [ "$distro" = 'debian' ]; then + component='main' + fi + + packagesUrl="https://repo.mongodb.org/apt/$distro/dists/$suite/mongodb-org/$major/$component/binary-amd64/Packages" fullVersion="$( curl -fsSL "$packagesUrl.gz" \ | gunzip \