Skip to content

This is a simple example of how to mount an S3 bucket to a local directory and run a Python script that reads a file from the mounted directory.

Notifications You must be signed in to change notification settings

watcharap0n/s3mountpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Mount point & Run a Python Script Using Docker

Description

This is a simple example of how to mount an S3 bucket to a local directory and run a Python script that reads a file from the mounted directory.

Prerequisites

Getting Started

  1. Clone the repository
git clone https://github.com/watcharap0n/s3mountpoint.git
  1. Navigate to the project directory
cd s3mountpoint
  1. Build the Docker image

**First, you need to set the ./entrypoint.sh file for the S3 bucket you want to mount. Replace the bucket_name with your S3 bucket name.

sudo docker build -f Dockerfile.s3mp -t python-s3mountpoint .
  1. Run the Docker container
sudo docker run --rm -it --device /dev/fuse --privileged python-s3mountpoint

Example output:

output

About

This is a simple example of how to mount an S3 bucket to a local directory and run a Python script that reads a file from the mounted directory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published