GithubHelp home page GithubHelp logo

twnel / docker-s3-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kickstarter/docker-s3-sync

0.0 4.0 0.0 314 KB

Docker container to sync SSH authorized keys from S3

Ruby 71.70% Shell 28.30%

docker-s3-sync's Introduction

Docker S3 Sync

A docker container to periodically fetch files from S3.

It's useful for provisioning sensitive credentials.

Usage:

Basic docker example:

# Copy s3://mybucket/authorized_keys to /root/.ssh/authorized_keys
docker run \
-e S3_BUCKET=mybucket \
-e S3_KEY=authorized_keys \
-e DESTINATION=/data/authorized_keys \
-e MODE='0600' # Optional file mode
-e OWNER_UID='1000' # Optional file owner
-e OWNER_GID='1000' # Optional file group
-v /root/.ssh:/data # Map /root/.ssh on the host to /data in the container
--rm \
kickstarter/docker-s3-sync

AWS credentials are assumed to be provided via an IAM instance profile. To use traditional AWS credentials, pass AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars.

Convenient docker-s3-sync script

A small ruby script is included to use the container more concisely.

Install it:

curl -O /usr/local/bin/docker-s3-sync https://raw.githubusercontent.com/kickstarter/docker-s3-sync/v0.5.3/docker-s3-sync
chmod +x /usr/local/bin/docker-s3-sync

Use it:

docker-s3-sync -b BUCKET -k KEY [-i INTERVAL ] [-m MODE] [-u UID] [-g GID] DESTINATION

# For example:
docker-s3-sync -b mybucket -k authorized_keys -m 0600 /root/.ssh/authorized_keys

docker-s3-sync's People

Watchers

 avatar  avatar  avatar  avatar

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.