s3fs

command module
v0.0.0-...-486efdd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 1 Imported by: 0

README

s3fs

🐳 AWS S3 client, Object Storage client

Build Go Report Docker Image Size (latest by date) Docker Pulls

Path:

AWS S3 Storage mounting path: /s3mnt

Supported

  • AWS S3
  • MinIO
  • And all AWS S3 alternative object storage solution

Simple docker compose usage:

version: '3.7'
services:
 s3fs:
  container_name: s3fs
  image: jkaninda/s3fs
  privileged: true
  devices:
    - "/dev/fuse"
  environment:
   - ACCESS_KEY=${ACCESS_KEY}
   - SECRET_KEY=${SECRET_KEY}
   - BUCKET_NAME=${BUCKET_NAME}
   - S3_ENDPOINT=${S3_ENDPOINT}

Copy a file to S3

This is a simple example of copying a file from your local storage to S3, and after the copy container will stop running. To keep the container running you need add --keep flag.

s3fsc mount --keep

version: '3.7'
services:
 s3fs:
  container_name: s3fs
  image: jkaninda/s3fs
  privileged: true
  volumes:
    - ./backup/:/backup
  devices:
    - "/dev/fuse"
    ## Mount S3 Storage and copy a file
  command:
   - /bin/sh
   - -c
   - |
     s3fsc mount 
    cp /backup/my_file.gz /s3mnt/my_file.gz 
  environment:
   - ACCESS_KEY=${ACCESS_KEY}
   - SECRET_KEY=${SECRET_KEY}
   - BUCKET_NAME=${BUCKET_NAME}
   - S3_ENDPOINT=${S3_ENDPOINT}

P.S. please give a star if you like it 😉

Documentation

Overview

Copyright © 2024 Jonas Kaninda <jonaskaninda@gmail.com>

Directories

Path Synopsis
Package cmd /*
Package cmd /*
Package pkg /*
Package pkg /*

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL