From 864f645510089d935244042d2486dec4c13bd006 Mon Sep 17 00:00:00 2001 From: pablo Date: Fri, 4 Mar 2022 17:19:55 +0100 Subject: [PATCH 1/2] fix build=true fix linter fix fix --- .dappnode_profile | 2 +- docker-compose.yml | 1 + iso/scripts/generate_docker_images.sh | 67 +++++++++++++++++---------- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/.dappnode_profile b/.dappnode_profile index c4380d8..e9bc269 100755 --- a/.dappnode_profile +++ b/.dappnode_profile @@ -6,7 +6,7 @@ export VPN_VERSION="${VPN_VERSION:-0.2.8}" export DAPPMANAGER_VERSION="${DAPPMANAGER_VERSION:-0.2.42}" export WIFI_VERSION="${WIFI_VERSION:-0.2.7}" export WIREGUARD_VERSION="${WIREGUARD_VERSION:-0.1.0}" -export HTTPS_VERSION="${HTTPS:-0.1.1}" +export HTTPS_VERSION="${HTTPS:-0.1.3}" export DAPPNODE_DIR="/usr/src/dappnode" export DAPPNODE_CORE_DIR="${DAPPNODE_DIR}/DNCORE" diff --git a/docker-compose.yml b/docker-compose.yml index 36310b6..7eddc98 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,3 +10,4 @@ services: - UNATTENDED=false # UNATTENDED version volumes: - ./images:/images + - "/var/run/docker.sock:/var/run/docker.sock" diff --git a/iso/scripts/generate_docker_images.sh b/iso/scripts/generate_docker_images.sh index c06b449..2e8f323 100755 --- a/iso/scripts/generate_docker_images.sh +++ b/iso/scripts/generate_docker_images.sh @@ -6,30 +6,49 @@ source /usr/src/app/.dappnode_profile echo "Cleaning previous files" rm -rf ./DNP_* -echo "Cloning & building DNP_HTTPS..." -git clone -b "v${HTTPS_VERSION}" https://github.com/dappnode/DNP_HTTPS -docker-compose -f ./DNP_HTTPS/docker-compose-https.yml build -docker save https.dnp.dappnode.eth:"$HTTPS_VERSION" | xz -e9vT0 >/images/https.dnp.dappnode.eth_"$HTTPS_VERSION"_linux-amd64.txz - -echo "Cloning & building DNP_WIREGUARD..." -git clone -b "v${WIREGUARD_VERSION}" https://github.com/dappnode/DNP_WIREGUARD -docker-compose -f ./DNP_WIREGUARD/docker-compose-wireguard.yml build -docker save wireguard.dnp.dappnode.eth:"$WIREGUARD_VERSION" | xz -e9vT0 >/images/wireguard.dnp.dappnode.eth_"$WIREGUARD_VERSION"_linux-amd64.txz - -echo "Cloning & building DNP_IPFS..." -git clone -b "v${IPFS_VERSION}" https://github.com/dappnode/DNP_IPFS -docker-compose -f ./DNP_IPFS/docker-compose-ipfs.yml build -docker save ipfs.dnp.dappnode.eth:"$IPFS_VERSION" | xz -e9vT0 >/images/ipfs.dnp.dappnode.eth_"$IPFS_VERSION"_linux-amd64.txz - -echo "Cloning & building DNP_BIND..." -git clone -b "v${BIND_VERSION}" https://github.com/dappnode/DNP_BIND -docker-compose -f ./DNP_BIND/docker-compose-bind.yml build -docker save bind.dnp.dappnode.eth:"$BIND_VERSION" | xz -e9vT0 >/images/bind.dnp.dappnode.eth_"$BIND_VERSION"_linux-amd64.txz - -echo "Cloning & building DNP_DAPPMANAGER..." -git clone -b "v${DAPPMANAGER_VERSION}" https://github.com/dappnode/DNP_DAPPMANAGER -docker-compose -f ./DNP_DAPPMANAGER/docker-compose-dappmanager.yml build -docker save dappmanager.dnp.dappnode.eth:"$DAPPMANAGER_VERSION" | xz -e9vT0 >/images/dappmanager.dnp.dappnode.eth_"$DAPPMANAGER_VERSION"_linux-amd64.txz +# Curl github release with version + +echo "Downloading source code & building DNP_WIREGUARD..." +curl -LJO https://github.com/dappnode/DNP_WIREGUARD/archive/refs/tags/"v${WIREGUARD_VERSION}.tar.gz" || { echo "Failed to download DNP_WIREGUARD"; exit 1; } +mkdir DNP_WIREGUARD +tar -xzf "DNP_WIREGUARD-${WIREGUARD_VERSION}.tar.gz" -C ./DNP_WIREGUARD --strip-components=1 || { echo "Failed to extract DNP_WIREGUARD"; exit 1; } +docker-compose -f ./DNP_WIREGUARD/docker-compose.yml build || { echo "Failed to build DNP_WIREGUARD"; exit 1; } +docker save wireguard.dnp.dappnode.eth:"${WIREGUARD_VERSION}" | xz -e9vT0 >/images/wireguard.dnp.dappnode.eth_"${WIREGUARD_VERSION}"_linux-amd64.txz || { echo "Failed to save wireguard.dnp.dappnode.eth_"${WIREGUARD_VERSION}"_linux-amd64.txz"; exit 1; } + +echo "Downloading source code & building DNP_HTTPS..." +curl -LJO https://github.com/dappnode/DNP_HTTPS/archive/refs/tags/"v${HTTPS_VERSION}.tar.gz" || { echo "Failed to download DNP_HTTPS"; exit 1; } +mkdir DNP_HTTPS +tar -xzf "DNP_HTTPS-${HTTPS_VERSION}.tar.gz" -C ./DNP_HTTPS --strip-components=1 || { echo "Failed to extract DNP_HTTPS"; exit 1; } +docker-compose -f ./DNP_HTTPS/docker-compose.yml build || { echo "Failed to build DNP_HTTPS"; exit 1; } +docker save https.dnp.dappnode.eth: "${HTTPS_VERSION}" | xz -e9vT0 >/images/https.dnp.dappnode.eth_"${HTTPS_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_HTTPS"; exit 1; } + +echo "Downloading source code & building DNP_IPFS..." +curl -LJO https://github.com/dappnode/DNP_IPFS/archive/refs/tags/"v${IPFS_VERSION}.tar.gz" || { echo "Failed to download DNP_IPFS"; exit 1; } +mkdir DNP_IPFS +tar -xzf "DNP_IPFS-${IPFS_VERSION}.tar.gz" -C ./DNP_IPFS --strip-components=1 || { echo "Failed to extract DNP_IPFS"; exit 1; } +docker-compose -f ./DNP_IPFS/docker-compose.yml build || { echo "Failed to build DNP_IPFS"; exit 1; } +docker save ipfs.dnp.dappnode.eth:"${IPFS_VERSION}" | xz -e9vT0 >/images/ipfs.dnp.dappnode.eth_"${IPFS_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_IPFS"; exit 1; } + +echo "Downloading source code & building DNP_BIND..." +curl -LJO https://github.com/dappnode/DNP_BIND/archive/refs/tags/"v${BIND_VERSION}.tar.gz" || { echo "Failed to download DNP_BIND"; exit 1; } +mkdir DNP_BIND +tar -xzf "DNP_BIND-${BIND_VERSION}.tar.gz" -C ./DNP_BIND --strip-components=1 || { echo "Failed to extract DNP_BIND"; exit 1; } +docker-compose -f ./DNP_BIND/docker-compose.yml build || { echo "Failed to build DNP_BIND"; exit 1; } +docker save bind.dnp.dappnode.eth:"${BIND_VERSION}" | xz -e9vT0 >/images/bind.dnp.dappnode.eth_"${BIND_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_BIND"; exit 1; } + +echo "Downloading source code & building DNP_DAPPMANAGER..." +curl -LJO https://github.com/dappnode/DNP_DAPPMANAGER/archive/refs/tags/"v${DAPPMANAGER_VERSION}.tar.gz" || { echo "Failed to download DNP_DAPPMANAGER"; exit 1; } +mkdir DNP_DAPPMANAGER +tar -xzf "DNP_DAPPMANAGER-${DAPPMANAGER_VERSION}.tar.gz" -C ./DNP_DAPPMANAGER --strip-components=1 || { echo "Failed to extract DNP_DAPPMANAGER"; exit 1; } +docker-compose -f ./DNP_DAPPMANAGER/docker-compose.yml build || { echo "Failed to build DNP_DAPPMANAGER"; exit 1; } +docker save dappmanager.dnp.dappnode.eth:"${DAPPMANAGER_VERSION}" | xz -e9vT0 >/images/dappmanager.dnp.dappnode.eth_"${DAPPMANAGER_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_DAPPMANAGER"; exit 1; } + +echo "Downloading source code & building DNP_WIFI..." +curl -LJO https://github.com/dappnode/DNP_WIFI/archive/refs/tags/"v${WIFI_VERSION}.tar.gz" || { echo "Failed to download DNP_WIFI"; exit 1; } +mkdir DNP_WIFI +tar -xzf "DNP_WIFI-${WIFI_VERSION}.tar.gz" -C ./DNP_WIFI --strip-components=1 || { echo "Failed to extract DNP_WIFI"; exit 1; } +docker-compose -f ./DNP_WIFI/docker-compose.yml build || { echo "Failed to build DNP_WIFI"; exit 1; } +docker save wifi.dnp.dappnode.eth:"${WIFI_VERSION}" | xz -e9vT0 >/images/wifi.dnp.dappnode.eth_"${WIFI_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_WIFI"; exit 1; } echo "Coping dappnode_all_docker_images_linux-amd64.txz to dappnode dir..." cp /images/* /usr/src/app/dappnode/ From 01a01e42e329f7fd47cf6f53560ee47800e4eb75 Mon Sep 17 00:00:00 2001 From: pablo Date: Sun, 6 Mar 2022 21:58:53 +0100 Subject: [PATCH 2/2] fix linter --- iso/scripts/generate_docker_images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iso/scripts/generate_docker_images.sh b/iso/scripts/generate_docker_images.sh index 2e8f323..8ca5636 100755 --- a/iso/scripts/generate_docker_images.sh +++ b/iso/scripts/generate_docker_images.sh @@ -13,7 +13,7 @@ curl -LJO https://github.com/dappnode/DNP_WIREGUARD/archive/refs/tags/"v${WIREGU mkdir DNP_WIREGUARD tar -xzf "DNP_WIREGUARD-${WIREGUARD_VERSION}.tar.gz" -C ./DNP_WIREGUARD --strip-components=1 || { echo "Failed to extract DNP_WIREGUARD"; exit 1; } docker-compose -f ./DNP_WIREGUARD/docker-compose.yml build || { echo "Failed to build DNP_WIREGUARD"; exit 1; } -docker save wireguard.dnp.dappnode.eth:"${WIREGUARD_VERSION}" | xz -e9vT0 >/images/wireguard.dnp.dappnode.eth_"${WIREGUARD_VERSION}"_linux-amd64.txz || { echo "Failed to save wireguard.dnp.dappnode.eth_"${WIREGUARD_VERSION}"_linux-amd64.txz"; exit 1; } +docker save wireguard.dnp.dappnode.eth:"${WIREGUARD_VERSION}" | xz -e9vT0 >/images/wireguard.dnp.dappnode.eth_"${WIREGUARD_VERSION}"_linux-amd64.txz || { echo "Failed to save DNP_WIREGUARD"; exit 1; } echo "Downloading source code & building DNP_HTTPS..." curl -LJO https://github.com/dappnode/DNP_HTTPS/archive/refs/tags/"v${HTTPS_VERSION}.tar.gz" || { echo "Failed to download DNP_HTTPS"; exit 1; }