Skip to content

Commit

Permalink
Improve upgrade command
Browse files Browse the repository at this point in the history
- Pull any new Dockside image, before upgrading, given this is what a
  user would typically expect
  • Loading branch information
struanb committed Mar 29, 2023
1 parent 2186bcf commit 686c11f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/server/bin/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ fi

log "Located Dockside volume '$DOCKSIDE_VOLUME' for Dockside container $DOCKSIDE_HOSTNAME"

log "Pulling latest version of image '$IMAGE' ..."
docker pull "$IMAGE"

log "Proceeding to launch new Dockside image '$IMAGE' to perform IDE upgrade ..."

docker run --rm -i --entrypoint=/bin/bash --mount=type=volume,src=$DOCKSIDE_VOLUME,dst=/opt/dockside.orig "$IMAGE" -c 'for typepath in /opt/dockside/ide/*; do type=$(basename $typepath); for idepath in $typepath/*; do ide=$(basename $idepath); dstpath=/opt/dockside.orig/ide; if [ -d "$dstpath/$type/$ide" ]; then echo "[--EXISTS--] $type/$ide"; else echo "[INSTALLING] $type/$ide"; cp -a $idepath $dstpath/$type/; fi; done; done'
Expand Down

0 comments on commit 686c11f

Please sign in to comment.