Skip to content

Commit

Permalink
all together + python2
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondMouthaan committed Aug 25, 2019
1 parent 4e11bc2 commit 7d31eb3
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 338 deletions.
264 changes: 1 addition & 263 deletions .docker/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,271 +148,9 @@ function docker_manifest_list_testing_or_latest() {
docker manifest push ${TARGET}:${TAG_PREFIX}${NODE_VERSION}${TAG_SUFFIX}
}

















docker_manifest_list() {
# arg 1 holds node version
# arg 2 holds tag suffix

# Create and push manifest lists
echo "DOCKER MANIFEST: Create and Push docker manifest lists."
# docker_manifest_list_version_rpi_python2 ${1}
# docker_manifest_list_version_rpi_python3 ${1}
# docker_manifest_list_version_rpi ${1}
# docker_manifest_list_version_python2 ${1}
# docker_manifest_list_version_python3 ${1}


# Create manifest list testing or latest
# case ${BUILD_VERSION} in
# *"testing"*)
# echo "DOCKER MANIFEST: Create and Push docker manifest list TESTING Node JS."
## docker_manifest_list_testing_or_latest_rpi_python2 ${1} "testing"
## docker_manifest_list_testing_or_latest_rpi_python3 ${1} "testing"
## docker_manifest_list_testing_or_latest_rpi ${1} "testing"
## docker_manifest_list_testing_or_latest_python2 ${1} "testing"
## docker_manifest_list_testing_or_latest_python3 ${1} "testing"
# docker_manifest_list_testing_or_latest ${1} "testing"
#
# if [[ ${1} == "-10" ]]; then
# echo "DOCKER MANIFEST: Create and Push docker manifest list TESTING."
## docker_manifest_list_testing_or_latest_rpi_python2 "" "testing"
## docker_manifest_list_testing_or_latest_rpi_python3 "" "testing"
## docker_manifest_list_testing_or_latest_rpi "" "testing"
## docker_manifest_list_testing_or_latest_python2 "" "testing"
## docker_manifest_list_testing_or_latest_python3 "" "testing"
# docker_manifest_list_testing_or_latest "" "testing"
# fi
# ;;
# *)
# echo "DOCKER MANIFEST: Create and Push docker manifest list LATEST Node JS."
## docker_manifest_list_testing_or_latest_rpi_python2 ${1} "latest"
## docker_manifest_list_testing_or_latest_rpi_python3 ${1} "latest"
## docker_manifest_list_testing_or_latest_rpi ${1} "latest"
## docker_manifest_list_testing_or_latest_python2 ${1} "latest"
## docker_manifest_list_testing_or_latest_python3 ${1} "latest"
# docker_manifest_list_testing_or_latest ${1} "latest"
#
# if [[ ${1} == "-10" ]]; then
# echo "DOCKER MANIFEST: Create and Push docker manifest list LATEST."
## docker_manifest_list_testing_or_latest_rpi_python2 "" "latest"
## docker_manifest_list_testing_or_latest_rpi_python3 "" "latest"
## docker_manifest_list_testing_or_latest_rpi "" "latest"
## docker_manifest_list_testing_or_latest_python2 "" "latest"
## docker_manifest_list_testing_or_latest_python3 "" "latest"
# docker_manifest_list_testing_or_latest "" "latest"
# fi
# ;;
# esac

# docker_manifest_list_version_os_arch
}

#docker_manifest_list_version_rpi_python2() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${1}-rpi-python2."
# docker manifest create ${TARGET}:${BUILD_VERSION}${1}-rpi-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v6-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v7-python2
#
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${BUILD_VERSION}${1}-rpi-python2
#}
#
#docker_manifest_list_version_rpi_python3() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${1}-rpi-python3."
# docker manifest create ${TARGET}:${BUILD_VERSION}${1}-rpi-python3 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v6-python3 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v7-python3
#
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${BUILD_VERSION}${1}-rpi-python3
#}
#
#docker_manifest_list_version_rpi() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${1}-rpi."
# docker manifest create ${TARGET}:${BUILD_VERSION}${1}-rpi \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v6 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v7
#
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-rpi ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${BUILD_VERSION}${1}-rpi
#}

#docker_manifest_list_version_python2() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${1}-python2."
# docker manifest create ${TARGET}:${BUILD_VERSION}${1}-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-amd64-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v6-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v7-python2 \
# ${TARGET}:${BUILD_VERSION}${1}-alpine-arm64v8-python2
#
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2 --os=linux --arch=arm --variant=v7
# docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python2 --os=linux --arch=arm64 --variant=v8
#
# docker manifest push ${TARGET}:${BUILD_VERSION}${1}-python2
#}

docker_manifest_list_version_python3() {
echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}${1}-python3."
docker manifest create ${TARGET}:${BUILD_VERSION}${1}-python3 \
${TARGET}:${BUILD_VERSION}${1}-alpine-amd64-python3 \
${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v6-python3 \
${TARGET}:${BUILD_VERSION}${1}-alpine-arm32v7-python3 \
${TARGET}:${BUILD_VERSION}${1}-alpine-arm64v8-python3

docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 --os=linux --arch=arm --variant=v6
docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3 --os=linux --arch=arm --variant=v7
docker manifest annotate ${TARGET}:${BUILD_VERSION}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python3 --os=linux --arch=arm64 --variant=v8

docker manifest push ${TARGET}:${BUILD_VERSION}${1}-python3
}




#docker_manifest_list_testing_or_latest_rpi_python2() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${2}${1}-rpi-python2."
# docker manifest create ${TARGET}:${2}${1}-rpi-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2
#
# docker manifest annotate ${TARGET}:${2}${1}-rpi-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${2}${1}-rpi-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${2}${1}-rpi-python2
#}
#
#docker_manifest_list_testing_or_latest_rpi_python3() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${2}${1}-rpi-python3."
# docker manifest create ${TARGET}:${2}${1}-rpi-python3 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3
#
# docker manifest annotate ${TARGET}:${2}${1}-rpi-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${2}${1}-rpi-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${2}${1}-rpi-python3
#}
#
#docker_manifest_list_testing_or_latest_rpi() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${2}${1}-rpi."
# docker manifest create ${TARGET}:${2}${1}-rpi \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7
#
# docker manifest annotate ${TARGET}:${2}${1}-rpi ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${2}${1}-rpi ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7 --os=linux --arch=arm --variant=v7
#
# docker manifest push ${TARGET}:${2}${1}-rpi
#}

#docker_manifest_list_testing_or_latest_python2() {
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${2}${1}-python2."
# docker manifest create ${TARGET}:${2}${1}-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-amd64-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2 \
# ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python2
#
# docker manifest annotate ${TARGET}:${2}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python2 --os=linux --arch=arm --variant=v6
# docker manifest annotate ${TARGET}:${2}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python2 --os=linux --arch=arm --variant=v7
# docker manifest annotate ${TARGET}:${2}${1}-python2 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python2 --os=linux --arch=arm64 --variant=v8
#
# docker manifest push ${TARGET}:${2}${1}-python2
#}

docker_manifest_list_testing_or_latest_python3() {
echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${2}${1}-python3."
docker manifest create ${TARGET}:${2}${1}-python3 \
${TARGET}:${BUILD_VERSION}${1:--10}-alpine-amd64-python3 \
${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 \
${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3 \
${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python3

docker manifest annotate ${TARGET}:${2}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v6-python3 --os=linux --arch=arm --variant=v6
docker manifest annotate ${TARGET}:${2}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm32v7-python3 --os=linux --arch=arm --variant=v7
docker manifest annotate ${TARGET}:${2}${1}-python3 ${TARGET}:${BUILD_VERSION}${1:--10}-alpine-arm64v8-python3 --os=linux --arch=arm64 --variant=v8

docker manifest push ${TARGET}:${2}${1}-python3
}



#
#docker_manifest_list_version_os_arch() {
# # Manifest Create alpine-amd64
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-amd64."
# docker manifest create ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-amd64 \
# ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-amd64
#
# # Manifest Push alpine-amd64
# docker manifest push ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-amd64
#
# # Manifest Create alpine-arm32v6
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6."
# docker manifest create ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6 \
# ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6
#
# # Manifest Annotate alpine-arm32v6
# docker manifest annotate ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6 ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6 --os=linux --arch=arm --variant=v6
#
# # Manifest Push alpine-arm32v6
# docker manifest push ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm32v6
#
# # Manifest Create slim-arm32v7
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7."
# docker manifest create ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7 \
# ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7
#
# # Manifest Annotate slim-arm32v7
# docker manifest annotate ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7 ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7 --os=linux --arch=arm --variant=v7
#
# # Manifest Push slim-arm32v7
# docker manifest push ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-slim-arm32v7
#
# # Manifest Create alpine-arm64v8
# echo "DOCKER MANIFEST: Create and Push docker manifest list - ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8."
# docker manifest create ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8 \
# ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8
#
# # Manifest Annotate alpine-arm64v8
# docker manifest annotate ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8 ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8 --os=linux --arch=arm64 --variant=v8
#
# # Manifest Push alpine-arm64v8
# docker manifest push ${TARGET}:${BUILD_VERSION}-${NODE_VERSION}-alpine-arm64v8
#}

function setup_dependencies() {
echo "PREPARE: Setting up dependencies."

sudo apt update -y
# sudo apt install realpath python python-pip -y
sudo apt install --only-upgrade docker-ce -y
# sudo pip install docker-compose || true
#
# docker info
# docker-compose --version
sudo apt update -y && sudo apt install --only-upgrade docker-ce -y
}

function update_docker_configuration() {
Expand Down
Loading

0 comments on commit 7d31eb3

Please sign in to comment.