Giter Club home page Giter Club logo

docker-insync's Introduction

github.com/tiredofit/docker-insync

GitHub release Build Status Docker Stars Docker Pulls Become a sponsor Paypal Donate

About

This will build a Docker iamge for insync. A tool for backing up Google Drive.

  • Supports Multiple accounts

Maintainer

Table of Contents

Installation

Build from Source

Clone this repository and build the image with docker build <arguments> (imagename) .

Prebuilt Images

Builds of the image are available on Docker Hub

docker pull docker.io/tiredofit/insync:(imagetag)

Builds of the image are also available on the Github Container Registry

docker pull ghcr.io/tiredofit/docker-insync:(imagetag)

The following image tags are available along with their tagged release based on what's written in the Changelog:

Version Container OS Tag
latest Debian :latest

Multi Architecture

Images are built primarily for amd64 architecture, and may also include builds for arm/v7, arm64 and others. These variants are all unsupported. Consider sponsoring my work so that I can work with various hardware. To see if this image supports multiple architecures, type docker manifest (image):(tag)

Configuration

Quick Start

Persistent Storage

The following directories are used for configuration and can be mapped for persistent storage.

Directory Description
/data Backup and Configuration Directory
/assets/custom-scripts Execute Custom Scripts before launching Insync - Drop .sh files here

Environment Variables

Base Images used

This image relies on an Alpine Linux base image that relies on an init system for added capabilities. Outgoing SMTP capabilities are handlded via msmtp. Individual container performance monitoring is performed by zabbix-agent. Additional tools include: bash,curl,less,logrotate,nano.

Be sure to view the following repositories to understand all the customizable options:

Image Description
OS Base Customized Image based on Alpine Linux
Parameter Description Default
INSYNC1_USERNAME Primary Your GDrive Username e.g. [email protected]
INSYNC1_AUTH_CODE Primary Authorization Code provided by Google
INSYNC1_DOWNLOAD Primary How to download files link (.gdoc), ms-office (.docx), open-document (.odt) link
INSYNC2_USERNAME Secondary Your GDrive Username e.g. [email protected]
INSYNC2_AUTH_CODE Secondary Authorization Code provided by Google
INSYNC2_DOWNLOAD Secondary How to download files link (.gdoc), ms-office (.docx), open-document (.odt) link
INSYNC3_USERNAME Third Your GDrive Username e.g. [email protected]
INSYNC3_AUTH_CODE Third Authorization Code provided by Google
INSYNC3_DOWNLOAD Third How to download files link (.gdoc), ms-office (.docx), open-document (.odt) link
PROXY_MODE Use Proxy TRUE or FALSE FALSE
PROXY_TYPE Type of Proxy HTTP SOCKS4 SOCKS5
PROXY_HOST Name of Proxy Host e.g. proxy
PROXY_PORT Port of Proxy e.g. 3128
PROXY_USER (Optional) Username for Proxy e.g. user
PROXY_PASS (Optional) Password for Proxy e.g. password

Networking

The following ports are exposed.

Port Description
3306 insync Server

Maintenance

Inside the image are tools to perform modification on how the image runs.

Selectively Syncing Files

  • Enter the container and execute manage_sync and use the Ncurses Interface

Ignoring Files/Folders

  • Enter the container and execute manage_ignore and use the Ncurses Interface

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

docker exec -it (whatever your container name is) bash

Manual Backups can be perforemd by entering the container and typing backup-now

Contributions

Welcomed. Please fork the repository and submit a pull request for any bug fixes, features or additions you propose to be included in the image. If it does not impact my intended usage case, it will be merged into the tree, tagged as a release and credit to the contributor in the CHANGELOG.

Support

These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.

Usage

  • The Discussions board is a great place for working with the community on tips and tricks of using this image.
  • Consider sponsoring me for personalized support

Bugfixes

  • Please, submit a Bug Report if something isn't working as expected. I'll do my best to issue a fix in short order.

Feature Requests

  • Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
  • Consider sponsoring me regarding development of features.

Updates

  • Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
  • Consider sponsoring me for up to date releases.

License

MIT. See LICENSE for more details.

References

docker-insync's People

Contributors

dddpaul avatar gitsf avatar samburney avatar tiredofit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-insync's Issues

Changing user from root

Do you know of a way to change this UID:GID of the user that runs insync?

I have tried changing the user when starting the docker using the -u flag, however it fails to start because of permission errors when trying to create the docker. It appears to be unable to copy over the install folder scripts.
I have also tried cloning your repository and modifying the dockerfile to have a USER block at the very end, after it copies files. However insync is unable to start.
I have kind of started trying to tweak the script files to see if I can get insync to run as a different user, but haven't had much luck yet.
I am not familiar with the s6 overlay that appears to be what is scheduling when to run insync.
Figured before I wasted more hours on it I would ask in case you know the answer already.

The reason I am trying to accomplish this is so my Google Drive files are not owned by root:root, as they are now.
I know I could create a script on the local machine to run every so often and change owners, but I figured if I could just change what uid:gid the docker is using for insync this would solve it at the source.
Any help you have would be greatly appreciated.

manage_sync not working

New Issue since it is a new topic hope that's ok.
I did have this issue before you switched the user account info so this might not be related to making that change.
Whenever I try to run manage_sync I get this error:
"Invalid number of arguments for manage_selective_sync
insync-headless manage_selective_sync EMAIL
Manage selective sync settings of account through a curses interface"

So thinking I needed to specify the email address after.
So I tried manage_sync [email protected]
and I get the same error.

It looks like the script is calling a username variable that is no longer used with the multi user.
So not sure if you have a good idea on how to do the multiuser

I have a couple of thoughts
1.) enter: manage_sync {1,2,3} - They would enter either 1-3 and then the script would look at the number entered and run the command pulling in that username variable.
2.) enter manage_sync - it will then list the Username variable values and then they would select 1,2,3 and then it would continue. This could be combined with above, they could enter what number they want when running, if they dont enter a number then it would present them with the list.
3.) enter manage_sync EMAIL - They enter the email address they want to modify
This one could simply be to update the command to:
TERM=xterm sudo -u insync exec /usr/bin/insync-headless manage_selective_sync $1

Not sure if you think one is easier than the other for the user, but as it stands these scripts(ignore & sync) dont work
Also when updating the scripts need to switch to the insync user when running the command
I believe I could write up the script combining option 1 & 2 above, I believe I already listed how to make opt 3 work.
Just let me know.
Thanks

Can't run commands

Hi

I have RPI 3 with OMV 5. I just deployed your container using portainer. I have followed your instructions. Container is running but when I try to run commands I have the below error:

Capture

In the logs I have below:

standard_init_linux.go:211: exec user process caused "exec format error"

My settings:

Capture1
Capture11

Any ideas or suggestions what went wrong?

Thansk

Tom

Sign in disabled

Obtaining the following error when trying to setup InSync in docker. Presumably, something changed on Google's end.
"Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In."

Problem with https://insynchq.com/auth URL

Summary

https://insynchq.com/auth leads me to a google page that states "Access blocked: Insync’s request is invalid". This is the exact URL that is returned:

https://accounts.google.com/signin/oauth/error/v2?authError=ChVyZWRpcmVjdF91cmlfbWlzbWF0Y2gSlgJUaGUgcmVkaXJlY3QgVVJJIGluIHRoZSByZXF1ZXN0LCB1cm46aWV0Zjp3ZzpvYXV0aDoyLjA6b29iLCBjYW4gb25seSBiZSB1c2VkIGJ5IGEgQ2xpZW50IElEIGZvciBuYXRpdmUgYXBwbGljYXRpb24uIEl0IGlzIG5vdCBhbGxvd2VkIGZvciB0aGUgV0VCIGNsaWVudCB0eXBlLiBZb3UgY2FuIGNyZWF0ZSBhIENsaWVudCBJRCBmb3IgbmF0aXZlIGFwcGxpY2F0aW9uIGF0IGh0dHBzOi8vY29uc29sZS5kZXZlbG9wZXJzLmdvb2dsZS5jb20vYXBpcy9jcmVkZW50aWFscy9vYXV0aGNsaWVudBpVaHR0cHM6Ly9kZXZlbG9wZXJzLmdvb2dsZS5jb20vaWRlbnRpdHkvcHJvdG9jb2xzL29hdXRoMi9vcGVuaWQtY29ubmVjdCNzZXRyZWRpcmVjdHVyaSCQAzLyAggBEpYCVGhlIHJlZGlyZWN0IFVSSSBpbiB0aGUgcmVxdWVzdCwgdXJuOmlldGY6d2c6b2F1dGg6Mi4wOm9vYiwgY2FuIG9ubHkgYmUgdXNlZCBieSBhIENsaWVudCBJRCBmb3IgbmF0aXZlIGFwcGxpY2F0aW9uLiBJdCBpcyBub3QgYWxsb3dlZCBmb3IgdGhlIFdFQiBjbGllbnQgdHlwZS4gWW91IGNhbiBjcmVhdGUgYSBDbGllbnQgSUQgZm9yIG5hdGl2ZSBhcHBsaWNhdGlvbiBhdCBodHRwczovL2NvbnNvbGUuZGV2ZWxvcGVycy5nb29nbGUuY29tL2FwaXMvY3JlZGVudGlhbHMvb2F1dGhjbGllbnQaVWh0dHBzOi8vZGV2ZWxvcGVycy5nb29nbGUuY29tL2lkZW50aXR5L3Byb3RvY29scy9vYXV0aDIvb3BlbmlkLWNvbm5lY3Qjc2V0cmVkaXJlY3R1cmk%3D&client_id=468017360789-e4camv9a5n4e90tk4vrpk49qonmcm95s.apps.googleusercontent.com

Screenshot 2022-10-19 141732

The OneDrive link works fine. It's just strange because I thought someone else would've reported this by now. I thought it had something to do with my computer/account, but this same message will display from anywhere.

How to change PUID and PGID ?

Hi,

how do i pass the environment variables to change the UID and GID from 12345 to 1000 ?

There are two environment varialbes for the base image which should allow to change the UID and GID in /etc/passwd and /etc/group... However, i am passing both variable for user insync and group insync but it does not change the UID or GID in the image.

Would be great if i can get some help. Other then this issue the sync seems to work fine.

Here is my docker-compose configuration :

insync-app:
image: tiredofit/insync
container_name: insync-app
networks:
- vlan99
environment:
- ZABBIX_HOSTNAME=insync-app
- INSYNC1_USERNAME=xxxx
- INSYNC1_AUTH_CODE=xxxx
- INSYNC_DOWNLOAD=ms-office
- DEBUG_PERMISSIONS=TRUE
- USER_INSYNC=1000
- GROUP_INSYNC=1000
- TIMEZONE=${TZ}

volumes:
  - ${DOCKERDIR}/insync:/data
restart: always

thx!

insync headless 3.x

Is there a switch to insync_headless 3.x in the works? certain licenses don't work anymore with the 1.5 version..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.