Skip to content

Commit

Permalink
Merge pull request #399 from dappnode/pablo/fix-build-true
Browse files Browse the repository at this point in the history
fix build=true
  • Loading branch information
pablomendezroyo authored Mar 6, 2022
2 parents 724a458 + 01a01e4 commit 3b87615
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .dappnode_profile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ services:
- UNATTENDED=false # UNATTENDED version
volumes:
- ./images:/images
- "/var/run/docker.sock:/var/run/docker.sock"
67 changes: 43 additions & 24 deletions iso/scripts/generate_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 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; }
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/
Expand Down

0 comments on commit 3b87615

Please sign in to comment.