Skip to content

dpizzuto/ubuntu-s3fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ubuntu-s3fs

The Dockerfile provides a way to create a ubuntu-based docker container with a S3 endpoint mounted as a filesystem

Prerequisites

  • S3 bucket
  • AWS role with read/write access to S3

Description

The Dockerfile contains a series of commands ready-to-use. There are two configuration files for fuse and supervisord.

This is a POC project so there are a bunch of improvements that should be done to beautify scripts.

Steps

  1. Gets the ubuntu base image from Docker repo
FROM ubuntu
  1. Install some required packages from package repo
RUN apt-get update && apt-get install -y \
  automake \
  autotools-dev \
  g++ \
  git \
  libcurl4-gnutls-dev \
  fuse \
  libfuse-dev \
  libssl-dev \
  libxml2-dev \
  make \
  pkg-config \
  supervisor \
  dos2unix
  1. Sets working directory and create a dir where scripts are placed
WORKDIR /home/
RUN mkdir scripts
  1. Copy installS3fs.sh (from AWS GitHub repo, but I suggest to make a fork) script on container and run it
COPY scripts/installS3fs.sh scripts/installS3fs.sh
RUN chmod +x scripts/installS3fs.sh
RUN . scripts/installS3fs.sh
  1. Copy some configuration file in the right directory
COPY config/fuse.conf /etc/fuse.conf
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  1. Copy and run runs3fs.sh and finalize configuration. Pay attention here, you have to insert the AWS information in order to work properly with SDK
COPY scripts/runS3fs.sh scripts/runS3fs.sh
RUN chmod +x scripts/*
RUN dos2unix scripts/runS3fs.sh
ENTRYPOINT /home/scripts/runS3fs.sh && /bin/bash
CMD ["/usr/bin/supervisord"]

About

Ready-to-use Docker container with s3fs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages