Git Product home page Git Product logo

Comments (4)

ocostello avatar ocostello commented on July 22, 2024 1

Thanks for the swift reply, that works perfectly now.

from s3mock.

afranken avatar afranken commented on July 22, 2024

@ocostello

Am I seriously misunderstanding this root config

yes and no.

The property works for the application, but not the Docker container. Since the S3Mock application is running inside Docker, the folder you specify in root will be created inside the Docker container, not on your system.

If you want so see the data in your local file system, you'll have to create a directory and mount it so it's accessible from inside the Docker container, for example:

mkdir tobemounted

services:
  s3mock:
    image: adobe/s3mock:3.5.2
    environment:
      - debug=true
      - retainFilesOnExit=true
      - root=s3container
    ports:
      - 9090:9090
      - 9191:9191
    volumes:
      - ./tobemounted:/s3container

Then, Docker will be able to access your file system.

from s3mock.

afranken avatar afranken commented on July 22, 2024

Example:

 ~/tmp/s3mock-mount-test                                                                                                                                                                                                                                                                                                                                                                                                     at 19:26:40
❯ ls
docker-compose.yml tobemounted

❯ cat docker-compose.yml
services:
  s3mock:
    image: adobe/s3mock:3.5.2
    environment:
      - debug=true
      - retainFilesOnExit=true
      - root=s3container
    ports:
      - 9090:9090
      - 9191:9191
    volumes:
      - ./tobemounted:/s3container

❯ docker-compose up
[...]

❯ curl --request PUT "http://localhost:9090/my-test-bucket/"

^CGracefully stopping... (press Ctrl+C again to force)
[+] Stopping 1/1
 ✔ Container s3mock-mount-test-s3mock-1  Stopped                                                                                                                                                                                                                                                                                                                                                                                     0.1s
canceled

❯ ls tobemounted
my-test-bucket

from s3mock.

afranken avatar afranken commented on July 22, 2024

@ocostello I added this description to the README.md, as it's hopefully helpful for other users as well:
https://github.com/adobe/S3Mock?tab=readme-ov-file#start-using-docker-compose

from s3mock.

Related Issues (20)

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.