Upgrading a docker container from before 2025
Before 2025, upgrading the Tillit Edge Docker required destroying the existing container, which led to missing files necessary for the new version. Starting in 2025, this issue has been resolved, and upgrades can now be performed without losing critical files.
If your docker-compose.yml file resembles the example below and is missing the lines added in "Since 2025," you will need to complete pre-upgrade steps before proceeding with the upgrade. If not, then you can easily use docker compose pull and docker compose up -d --force-recreate to upgrade to latest version of the image
Example docker-compose File Before 2025
version: '3.7'
services:
TillitEdge:
image: gotillit/edge:latest
environment:
- INIT_CONFIG=/greengrass/v2/config.yaml
- AWS_REGION=ap-southeast-2
volumes:
- ./tillitEdgeConfig:/tillit/
- ./SystemsManagerConfig:/var/lib/amazon/ssm
privileged: true #Allows device defender to read from tmpfs
restart: alwaysExample docker-compose File Since 2025
services:
TillitEdge:
image: gotillit/edge:latest
environment:
- INIT_CONFIG=/greengrass/v2/config.yaml
- AWS_REGION=ap-southeast-2
volumes:
- ./tillitEdgeConfig:/tillit/
- ./greengrass/packages:/greengrass/v2/packages
- ./greengrass/deployment:/greengrass/v2/deployments
- ./greengrass/config:/greengrass/v2/config
- ./greengrass/logs:/greengrass/v2/logs
restart: alwaysPre-Upgrading Before 2025
If you are upgrading from a version prior to 2025, you will need to copy required files from the running container to the host system in the same directory as your docker-compose.yml file. Below are the steps to accomplish this:
Using Command Line (Recommended)
Open a Terminal: Open a terminal window and list the running containers:
docker container listCopy the Container ID: Locate and copy the Container ID of the TilliT Edge container you wish to update.
Prepare the Host Directory: Navigate to the directory containing the
docker-compose.ymlfile and create agreengrassdirectory:mkdir greengrassCopy Files from the Container: Use the following commands to copy the necessary files from the container to your local directory. Replace
<container_id>with the Container ID from Step 2:docker cp <container_id>:/greengrass/v2/packages ./greengrass/packages docker cp <container_id>:/greengrass/v2/deployments ./greengrass/deployments docker cp <container_id>:/greengrass/v2/config ./greengrass/config docker cp <container_id>:/greengrass/v2/logs ./greengrass/logsUpdate the
docker-compose.yml: Modify thedocker-compose.ymlfile to include the updates listed in "Since 2025."Pull the Latest Image: Run the following command to pull the latest version of the TilliT Edge image:
docker-compose pullRecreate the Container: Restart the container with the latest version of the image:
docker-compose up -d --force-recreateVerify the Upgrade: Check in TilliT to ensure the Edge is functioning as expected.
Using Docker Desktop (Not Recommended)
Prepare the Host Directory: Open the folder location containing the
docker-compose.ymlfile and create agreengrassdirectory.Access the Container Files: Open Docker Desktop and locate the TilliT Edge container. Navigate to the Files tab, then open the
greengrass/v2directory within the container.Copy Required Folders: Save the following folders by right clicking them from the container to the
greengrassdirectory on your host system:packagesdeploymentsconfiglogs
Update the Image: In Docker Desktop, go to the Images panel and select Pull from the context menu to update the image.
Recreate the Container: Open a terminal, navigate to the directory containing the
docker-compose.ymlfile, and run the following commands:docker-compose pull docker-compose up -d --force-recreateVerify the Upgrade: Check in TilliT to ensure the Edge is functioning as expected.
Last updated