Convert Figma logo to code with AI

EugenMayer logodocker-sync

Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux

3,528
289
3,528
6

Top Related Projects

5,702

Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets

3,405

Fast file synchronization and network forwarding for remote development

63,682

Open Source Continuous File Synchronization

5,728

Intuitive find & replace CLI (sed alternative)

27,614

Easily and securely send things from one computer to another :crocodile: :package:

Quick Overview

Docker-sync is an open-source tool designed to significantly speed up Docker performance on macOS and Windows. It addresses the slow I/O performance issues in Docker for Mac and Windows by using efficient file synchronization strategies, allowing developers to work with their codebase at near-native speeds while still leveraging Docker containers.

Pros

  • Dramatically improves Docker performance on macOS and Windows
  • Supports various synchronization strategies (e.g., native_osx, unison, rsync)
  • Integrates well with docker-compose and other Docker workflows
  • Active community and regular updates

Cons

  • Adds complexity to the development setup
  • Requires additional configuration and maintenance
  • May introduce synchronization conflicts in some edge cases
  • Learning curve for new users

Getting Started

  1. Install docker-sync:
gem install docker-sync
  1. Create a docker-sync.yml file in your project root:
version: "2"
syncs:
  your-app-sync:
    src: '.'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', 'vendor']
  1. Update your docker-compose.yml file to use the sync volume:
version: '3'
services:
  your-app:
    volumes:
      - your-app-sync:/app:nocopy
volumes:
  your-app-sync:
    external: true
  1. Start docker-sync and your containers:
docker-sync start
docker-compose up

For more detailed instructions and advanced configurations, refer to the official documentation on the GitHub repository.

Competitor Comparisons

5,702

Lsyncd (Live Syncing Daemon) synchronizes local directories with remote targets

Pros of lsyncd

  • Lightweight and efficient, using inotify for real-time file system monitoring
  • More flexible, can be used for various synchronization scenarios beyond Docker
  • Supports multiple synchronization methods (rsync, rsyncssh, direct)

Cons of lsyncd

  • Requires more manual configuration and setup
  • Less integrated with Docker ecosystem
  • May require additional tools or scripts for complex Docker setups

Code Comparison

lsyncd configuration example:

sync {
    default.rsync,
    source = "/local/path",
    target = "user@remote:/path",
    delay = 1
}

docker-sync configuration example:

version: "2"
syncs:
  app-sync:
    src: './app'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', 'tmp', 'log']

Key Differences

  • lsyncd is a general-purpose file synchronization tool, while docker-sync is specifically designed for Docker development environments
  • docker-sync offers easier integration with Docker Compose and better performance on macOS
  • lsyncd provides more granular control over synchronization behavior but requires more manual configuration
  • docker-sync includes built-in strategies for different operating systems, while lsyncd relies on external tools like rsync

Both tools aim to solve file synchronization issues, but docker-sync is more focused on Docker development workflows, especially on macOS, while lsyncd offers broader applicability for various synchronization needs.

3,405

Fast file synchronization and network forwarding for remote development

Pros of Mutagen

  • Faster synchronization due to efficient delta transfers and caching
  • Cross-platform support (macOS, Windows, Linux) without additional dependencies
  • Built-in terminal multiplexer for managing multiple sessions

Cons of Mutagen

  • Steeper learning curve and more complex configuration
  • Less integrated with Docker ecosystem compared to docker-sync
  • May require manual conflict resolution in some cases

Code Comparison

docker-sync configuration:

version: "2"
syncs:
  app-sync:
    src: '.'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', 'vendor']

Mutagen configuration:

sync:
  defaults:
    mode: "two-way-resolved"
    ignore:
      vcs: true
      paths:
        - "node_modules"
        - "vendor"
  app:
    alpha: "."
    beta: "docker://container-name/app"

Both tools aim to improve development performance with Docker on macOS, but they approach the problem differently. docker-sync focuses on Docker-specific solutions and offers easier integration with Docker Compose. Mutagen provides a more general-purpose synchronization tool with broader platform support and additional features like session management. The choice between them depends on specific project requirements and development environment preferences.

63,682

Open Source Continuous File Synchronization

Pros of Syncthing

  • Cross-platform support for Windows, macOS, Linux, Android, and more
  • Decentralized peer-to-peer synchronization without relying on cloud services
  • Strong focus on security with end-to-end encryption

Cons of Syncthing

  • Requires setup on all devices, which can be more complex than Docker-sync
  • Not specifically designed for Docker development environments
  • May have higher resource usage due to its broader synchronization capabilities

Code Comparison

Syncthing configuration (config.xml):

<folder id="default" path="/path/to/sync" type="sendreceive">
    <device id="DEVICE-ID-HERE"></device>
    <minDiskFree unit="%">1</minDiskFree>
    <fsWatcherEnabled>true</fsWatcherEnabled>
</folder>

Docker-sync configuration (docker-sync.yml):

version: "2"
syncs:
  app-sync:
    src: '.'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', 'tmp', 'log']

While both tools aim to improve file synchronization, Syncthing offers a more versatile solution for general file syncing across various platforms. Docker-sync, on the other hand, is tailored specifically for Docker development environments, providing a simpler setup process for that use case.

5,728

Intuitive find & replace CLI (sed alternative)

Pros of sd

  • Lightweight and fast, focusing solely on string replacement
  • Written in Rust, offering excellent performance
  • Simple command-line interface for quick find-and-replace operations

Cons of sd

  • Limited to string replacement functionality
  • Lacks advanced features for Docker development environments
  • Not specifically designed for Docker-related tasks

Code comparison

sd:

sd 'pattern' 'replacement' file.txt

docker-sync:

version: "2"
syncs:
  app-sync:
    src: '.'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', '.git']

Key differences

docker-sync is specifically designed for improving Docker performance on macOS and Windows, focusing on file synchronization between host and containers. It offers various sync strategies and configuration options for Docker development environments.

sd, on the other hand, is a general-purpose command-line tool for find-and-replace operations. It's not Docker-specific and doesn't address the same use cases as docker-sync.

While docker-sync aims to solve performance issues in Docker development environments, sd is a lightweight utility for quick text manipulations across various file types and scenarios.

27,614

Easily and securely send things from one computer to another :crocodile: :package:

Pros of croc

  • Simpler setup and usage for general file transfer tasks
  • Works across different platforms and networks without complex configuration
  • Supports end-to-end encryption for secure file transfers

Cons of croc

  • Not specifically designed for Docker development workflows
  • Lacks advanced features for container synchronization and performance optimization
  • May require manual intervention for large-scale or continuous file syncing

Code comparison

croc:

# Sending a file
croc send /path/to/file

# Receiving a file
croc <code-phrase>

docker-sync:

# docker-sync.yml
version: "2"
syncs:
  app-sync:
    src: '.'
    sync_strategy: 'native_osx'
    sync_excludes: ['node_modules', '.git']

Summary

croc is a versatile file transfer tool that excels in simplicity and cross-platform compatibility. It's ideal for quick, secure file sharing but may not be as suitable for complex Docker development environments.

docker-sync, on the other hand, is specifically tailored for Docker development, offering advanced synchronization features and performance optimizations. It's more complex to set up but provides better integration with Docker workflows.

Choose croc for simple file transfers or docker-sync for Docker-specific development needs.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Gem Version Build Status

Thank you for all the feedback and support i already received!
Docker-sync has been improved by all of you in huge ways!

Important links:

Docker-sync needs contributions and help

  • Help here if you are a coder
  • Help here with the docs no matter what skill set you have. See the docs/README.md on how to work with the docs.
  • Otherwise, please consider sponsering me a bear via Patreon as an alternative.

Main Contributors: