Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contents of volume are deleted in version 2.1.36 and later #286

Closed
muskedunder opened this issue Aug 30, 2021 · 3 comments · Fixed by #288
Closed

Contents of volume are deleted in version 2.1.36 and later #286

muskedunder opened this issue Aug 30, 2021 · 3 comments · Fixed by #288

Comments

@muskedunder
Copy link

I create an s3 container according to the following compose file, then I post some data to the container.

version: '3.7'
services:
  s3:
    image: adobe/s3mock:2.1.36
    ports:
      - "9090:9090"
    environment:
      - initialBuckets=myFirstBucket
      - root=/data
    volumes:
      - s3_data:/data
volumes:
  s3_data:

I can inspect the volume s3_data and see that the data is there as expected.

However, if I stop the container the data in the volume is suddenly lost, which was not the case with version 2.1.34.

@afranken
Copy link
Member

Yes, that is correct.

Before, S3Mock would never delete any files, cluttering every developer's machine or build system.
Now it deletes any files that were created during it's lifetime.

@muskedunder
Copy link
Author

Hmm, ok.

But if I explicitly create a volume that maps to the data directory of the container I would certainly expect it to remain even after the container is stopped, and that is also how it works for all other database containers that I have used.

@muskedunder muskedunder changed the title Contents of volume is deleted in version 2.1.36 and later Contents of volume are deleted in version 2.1.36 and later Aug 31, 2021
afranken added a commit that referenced this issue Sep 1, 2021
Default is "false", all files are removed.

Fixes #286
afranken added a commit that referenced this issue Sep 23, 2021
Default is "false", all files are removed.

Fixes #286
@afranken
Copy link
Member

@muskedunder Just released 2.2.2 containing this change.

lennartblom pushed a commit to lennartblom/S3Mock that referenced this issue Nov 24, 2021
Default is "false", all files are removed.

Fixes adobe#286
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants