A Docker image to sync a Google Drive on disk using Insync and s6-overlay
.
Note: This Docker image is inspired from https://github.com/tiredofit/docker-insync.
Use the following docker-compose.yml
file:
version: "3"
services:
insync:
container_name: insync
image: forabi/docker-insync
restart: unless-stopped
environment:
TIMEZONE: "America/Montreal"
PUID: 1000
PGID: 1000
INSYNC_1_USERNAME: $DRIVE_USERNAME
INSYNC_1_AUTH_CODE: $DRIVE_TOKEN
INSYNC_1_DOWNLOAD: "ms-office"
INSYNC_1_DISABLE_SYNC: >
root:<FOLDER_ID>,
root:<FOLDER_ID>,
root:<FOLDER_ID>,
INSYNC_1_ENABLE_SYNC: >
root:<FOLDER_ID>,
root:<FOLDER_ID>
volumes:
- ../Drive:/data
You need to clone this repository and build the repository:
git clone https://github.com/hadim/docker-insync.git
cd docker-insync/
docker-compose build
Edit docker-compose.yml
. Then run the container:
docker-compose up -d
docker-compose logs -f insync
Directory | Description |
---|---|
/data |
Backup and Configuration Directory |
Parameter | Description | Default |
---|---|---|
TIMEZONE |
Timezone string | "America/Montreal" |
PUID |
User ID (use id $USER ) |
1000 |
PGID |
Group ID (use id $USER ) |
1000 |
INSYNC_1_USERNAME |
Google Drive username (email) | $DRIVE_USERNAME |
INSYNC_1_AUTH_CODE |
Google Drive Auth Token | $DRIVE_TOKEN |
INSYNC_1_DOWNLOAD |
How to download Office files: link (.gdoc), ms-office (.docx), open-document (.odt) |
"ms-office" |
INSYNC_1_DISABLE_SYNC |
List of folder IDs separated by a comma to exclude. | |
INSYNC_1_ENABLE_SYNC |
List of folder IDs separated by a comma to include. |
You can also define INSYNC_2_USERNAME
, INSYNC_3_USERNAME
and so forth to sync multiple users.