mirror of
https://github.com/matrix-construct/construct
synced 2024-10-31 19:08:59 +01:00
docker/alpine: Use build args for urls/versions.
This commit is contained in:
parent
e7f3bdafa6
commit
3c59438fae
2 changed files with 19 additions and 36 deletions
|
@ -9,15 +9,18 @@ ARG cxx
|
|||
ARG extra_packages_dev
|
||||
ARG extra_packages_dev1
|
||||
ARG extra_packages_dev2
|
||||
|
||||
ENV rocks_version 7.4.3
|
||||
ENV rocks_url https://codeload.github.com/facebook/rocksdb/tar.gz/refs/tags/v${rocks_version}
|
||||
ENV ctor_url https://github.com/matrix-construct/construct
|
||||
ARG rocksdb_version 7.4.3
|
||||
ARG rocksdb_url
|
||||
ARG ctor_url https://github.com/matrix-construct/construct
|
||||
|
||||
ENV CC ${cc}
|
||||
ENV CXX ${cxx}
|
||||
ENV CONFIG_SHELL bash
|
||||
|
||||
ENV rocksdb_version ${rocksdb_version}
|
||||
ENV rocksdb_url https://codeload.github.com/facebook/rocksdb/tar.gz/refs/tags/v${rocksdb_version}
|
||||
ENV ctor_url ${ctor_url}
|
||||
|
||||
ENV packages_dev="\
|
||||
${packages_dev} \
|
||||
autoconf \
|
||||
|
@ -38,10 +41,10 @@ ${extra_packages_dev2} \
|
|||
WORKDIR /usr/src
|
||||
RUN true \
|
||||
&& apk add --no-cache ${packages_dev} \
|
||||
&& curl -sL ${rocks_url} -o rocksdb-${rocks_version}.tar.gz \
|
||||
&& tar xfz rocksdb-${rocks_version}.tar.gz \
|
||||
&& rm -v rocksdb-${rocks_version}.tar.gz \
|
||||
&& mv -v rocksdb-${rocks_version} rocksdb \
|
||||
&& curl -sL ${rocksdb_url} -o rocksdb-${rocksdb_version}.tar.gz \
|
||||
&& tar xfz rocksdb-${rocksdb_version}.tar.gz \
|
||||
&& rm -v rocksdb-${rocksdb_version}.tar.gz \
|
||||
&& mv -v rocksdb-${rocksdb_version} rocksdb \
|
||||
&& git clone ${ctor_url} construct \
|
||||
&& rmdir -v construct/deps/rocksdb \
|
||||
&& ln -sv /usr/src/rocksdb construct/deps/rocksdb \
|
||||
|
|
|
@ -3,11 +3,15 @@
|
|||
BASEDIR=$(dirname "$0")
|
||||
ACCT=jevolk
|
||||
REPO=construct
|
||||
ctor_url="https://github.com/matrix-construct/construct"
|
||||
rocksdb_version=7.4.3
|
||||
|
||||
ARGS_=""
|
||||
ARGS_="$ARGS_ --compress=true"
|
||||
ARGS_="$ARGS_ --build-arg acct=$ACCT"
|
||||
ARGS_="$ARGS_ --build-arg repo=$REPO"
|
||||
ARGS_="$ARGS_ --build-arg ctor_url=$ctor_url"
|
||||
ARGS_="$ARGS_ --build-arg rocksdb_version=$rocksdb_version"
|
||||
|
||||
export DOCKER_BUILDKIT=1
|
||||
#export BUILDKIT_PROGRESS=plain
|
||||
|
@ -34,7 +38,7 @@ ARGS="$ARGS --platform linux/amd64"
|
|||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-amd64 $BASEDIR/alpine/3.16/full
|
||||
|
||||
#
|
||||
# L2 - Built images
|
||||
# L2/L3 - Built/Test images
|
||||
#
|
||||
|
||||
ARGS="$ARGS_"
|
||||
|
@ -44,6 +48,7 @@ ARGS="$ARGS --build-arg extra_packages_dev=gcc"
|
|||
ARGS="$ARGS --build-arg extra_packages_dev1=g++"
|
||||
ARGS="$ARGS --build-arg cc=gcc --build-arg cxx=g++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-built-gcc-amd64 $BASEDIR/alpine/3.16/built
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-test-gcc-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
|
@ -53,6 +58,7 @@ ARGS="$ARGS --build-arg extra_packages_dev1=llvm"
|
|||
ARGS="$ARGS --build-arg extra_packages_dev2=llvm-dev"
|
||||
ARGS="$ARGS --build-arg cc=clang --build-arg cxx=clang++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-built-clang-amd64 $BASEDIR/alpine/3.16/built
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-test-clang-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
|
@ -61,6 +67,7 @@ ARGS="$ARGS --build-arg extra_packages_dev=gcc"
|
|||
ARGS="$ARGS --build-arg extra_packages_dev1=g++"
|
||||
ARGS="$ARGS --build-arg cc=gcc --build-arg cxx=g++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-built-gcc-amd64 $BASEDIR/alpine/3.16/built
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-test-gcc-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
|
@ -70,33 +77,6 @@ ARGS="$ARGS --build-arg extra_packages_dev1=llvm"
|
|||
ARGS="$ARGS --build-arg extra_packages_dev2=llvm-dev"
|
||||
ARGS="$ARGS --build-arg cc=clang --build-arg cxx=clang++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-built-clang-amd64 $BASEDIR/alpine/3.16/built
|
||||
|
||||
#
|
||||
# L3 - Test images
|
||||
#
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
ARGS="$ARGS --build-arg feature=base"
|
||||
ARGS="$ARGS --build-arg cc=gcc --build-arg cxx=g++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-test-gcc-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
ARGS="$ARGS --build-arg feature=base"
|
||||
ARGS="$ARGS --build-arg cc=clang --build-arg cxx=clang++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-base-test-clang-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
ARGS="$ARGS --build-arg feature=full"
|
||||
ARGS="$ARGS --build-arg cc=gcc --build-arg cxx=g++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-test-gcc-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
ARGS="$ARGS_"
|
||||
ARGS="$ARGS --platform linux/amd64"
|
||||
ARGS="$ARGS --build-arg feature=full"
|
||||
ARGS="$ARGS --build-arg cc=clang --build-arg cxx=clang++"
|
||||
docker build $ARGS -t $ACCT/$REPO:alpine-3.16-full-test-clang-amd64 $BASEDIR/alpine/3.16/test
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue