|
|
@ -9,19 +9,58 @@ Since 4.0.6 based on alpine 3.9, alpine is not packaging mongo |
|
|
|
anymore. So we use the official version (that is huge). We still |
|
|
|
must change entrypoint to enforce proper directory paths. |
|
|
|
|
|
|
|
A ``Dockerfile`` is provided for this mean. |
|
|
|
*** Build new images |
|
|
|
|
|
|
|
You can fetch latest official tags: |
|
|
|
#+begin_quote |
|
|
|
docker-tags-fetch mongo -l 10 -f '^[0-9]+\.[0-9]+\.[0-9]+$' |
|
|
|
#+end_quote |
|
|
|
Get the last upstream images versions with: |
|
|
|
|
|
|
|
change it in docker file, then |
|
|
|
#+begin_src sh |
|
|
|
actions/upstream-versions -l 10 |
|
|
|
#+end_src |
|
|
|
|
|
|
|
#+begin_quote |
|
|
|
docker build . -t docker.0k.io/mongo:"$TAG"-myc |
|
|
|
#+end_quote |
|
|
|
Then use these function to help you manage the ~upgrade/build~ |
|
|
|
directory and create the ~*-myc~ images from upstream images: |
|
|
|
|
|
|
|
#+begin_src sh |
|
|
|
MONGO_VERSION=$( |
|
|
|
docker-tags-fetch nextcloud -l 10 -f "^[0-9]+\.[0-9]+\.[0-9]+$" | |
|
|
|
sort -V | |
|
|
|
tail -n 1 | |
|
|
|
cut -f 1 -d "-" |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
mk_build_dir() { |
|
|
|
local new_version="$1" VLV VV T |
|
|
|
( |
|
|
|
cd upgrade/build |
|
|
|
|
|
|
|
MONGO_LAST_VERSION=$( |
|
|
|
find . -maxdepth 1 -mindepth 1 -type d -regex "./[0-9]+\.[0-9]+\.[0-9]+" -printf "%f\n" | |
|
|
|
sort -V | tail -n 1) |
|
|
|
|
|
|
|
for variant in ""; do |
|
|
|
if [ -z "$variant" ]; then |
|
|
|
VLV="${MONGO_LAST_VERSION}" |
|
|
|
VV="${new_version}" |
|
|
|
T="${new_version}-myc" |
|
|
|
else |
|
|
|
VLV="${MONGO_LAST_VERSION}-$variant" |
|
|
|
VV="${new_version}-$variant" |
|
|
|
T="${new_version}-myc-$variant" |
|
|
|
fi |
|
|
|
|
|
|
|
cp -r "${VLV}" "${VV}" |
|
|
|
|
|
|
|
sed -ri "s/FROM mongo:.*/FROM mongo:${new_version}/g" "$VV"/Dockerfile |
|
|
|
|
|
|
|
docker build "$VV" -t docker.0k.io/mongo:${T} || return 1 |
|
|
|
docker push "docker.0k.io/mongo:${T}" || return 1 |
|
|
|
done |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
mk_build_dir "$MONGO_VERSION" |
|
|
|
#+end_src |
|
|
|
|
|
|
|
** General Access |
|
|
|
|
|
|
|