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

Request: Support for tmpfs parameter when launching containers #469

Closed
CameronGo opened this issue Aug 3, 2016 · 34 comments
Closed

Request: Support for tmpfs parameter when launching containers #469

CameronGo opened this issue Aug 3, 2016 · 34 comments

Comments

@CameronGo
Copy link

There is now support in the docker engine for a tmpfs flag that mounts a tmpfs file system into the running container. I believe this was added with docker v1.10.0. I would very much like to use this as a mechanism to store config secrets (such as PGP keys, DB passwords, etc...) I do not see a way currently to pass this option in to the ECS TaskDefinition. The syntax for the docker run command with this parameter looks like this:

docker run -ti --tmpfs /secrets:rw,noexec,nosuid,size=100m ubuntu:14.04 bash

@ceharris
Copy link

ceharris commented Aug 8, 2016

While the use of tmpfs mounts for secrets is also interesting, another use case for this feature would be to allow containers running under ECS to more easily run in read-only mode; e.g. by mounting tmpfs filesystems on /tmp, /var/run, etc.

@Overbryd
Copy link

This would be highly appreciated!

I would like to run some containers read only and use --tmpfs to give them some read/write space they can use (it is ephermal data anyways). This would substantially lower the pressure on EBS io.

+1

@raygunsix
Copy link

+1

@rhuddleston
Copy link

+1 I would also like to run read only and need this to move forward with that

@cyrilchampier
Copy link

+1, nice to have

@ceharris
Copy link

ceharris commented Jan 24, 2017

Running containers with a read-only root filesystem is now part of the CIS benchmark, and thus it won't be long before organizations start insisting on having this Docker functionality when running on ECS. It's possible run read-only now, but without having tmpfs for scratch space, it's hard to use effectively.

@philenz
Copy link

philenz commented Feb 27, 2017

+1 such a simple and effective security option to use read-only with tmpfs

@osiegmar
Copy link

+1

2 similar comments
@nomnux
Copy link

nomnux commented Apr 6, 2017

+1

@Prendo93
Copy link

+1

@seren
Copy link

seren commented Jun 26, 2017

This would be useful for us as well

@jhmartin
Copy link

jhmartin commented Aug 2, 2017

A specific use case for this is the storage of the Varnish VSM file, where Varnish is very sensitive to slowdowns in writes to this temporary file. Mounting this directory into tmpfs would insulate it against EBS latencies.

@piotrbulinski
Copy link

In some cases, it's sufficient with using /dev/shm (which is tmpfs and has 64M by default).

@jhmartin
Copy link

jhmartin commented Aug 9, 2017

@piotrbulinski I looked at that, but unfortunately my Varnish VSM file is about 80MB.

@piotrbulinski
Copy link

@jhmartin indeed, in some cases it will not be enough. Unfortunately for you the --shm-size is not supported either (#787)...

@coen-hyde
Copy link

I don't like being just another +1 but this is essential for running readonly containers

@sdesalas
Copy link

sdesalas commented Aug 28, 2017

+1... @jhmartin, in the meantime you can increase the size of /dev/shm as a workaround.

@kerryjj
Copy link

kerryjj commented Sep 27, 2017

+1 to being able to use tmpfs in ecs and elasticbeanstalk

@ghost
Copy link

ghost commented Oct 2, 2017

+1

1 similar comment
@bruceharrison1984
Copy link

+1

@zbyszek-matuszewski
Copy link

+1

3 similar comments
@jayaskren
Copy link

+1

@dond00m
Copy link

dond00m commented Oct 17, 2017

+1

@asieira
Copy link

asieira commented Oct 26, 2017

+1

@asieira
Copy link

asieira commented Oct 26, 2017

Actually, --tmpfs doesn't allow you to set options. Ideally, we should be able to specify the tmpfs size and default file mode as per --mount type=tmpfs.

My use case is a per-container RAM disk for a sqlite database when running https://github.com/mlsecproject/gglsbl-rest in my ECS cluster, for performance reasons.

@gavinmh
Copy link

gavinmh commented Oct 30, 2017

+1

2 similar comments
@Stavanger75
Copy link

+1

@wangdrew
Copy link

wangdrew commented Dec 6, 2017

+1

@t0sche
Copy link

t0sche commented Dec 22, 2017

Would love to see this in ECS since it is supported in docker_containers

@samuelkarp
Copy link
Contributor

A proposal for the implementation of tmpfs is available in #1149.

sharanyad added a commit to sharanyad/amazon-ecs-agent that referenced this issue Jan 25, 2018
This commit contains the model changes and functional tests for the new Task Definition fields for shmsize and tmpfs.

This addresses the following issues:
* aws#787
* aws#469
sharanyad added a commit to sharanyad/amazon-ecs-agent that referenced this issue Jan 25, 2018
This commit contains the model changes and functional tests for the new Task Definition fields for shmsize and tmpfs.

This addresses the following issues:
* aws#787
* aws#469
@aaithal
Copy link
Contributor

aaithal commented Mar 20, 2018

Hello everyone, we announced support for tmpfs parameter in the task definition today! Please refer to our documentation for more details.

Closing this issue for now. Please let us know if you have any follow up comments/questions regarding this.

@aaithal aaithal closed this as completed Mar 20, 2018
sharanyad added a commit that referenced this issue Mar 20, 2018
This commit contains the model changes and functional tests for the new Task Definition fields for shmsize and tmpfs.

This addresses the following issues:
* #787
* #469
@jorrit
Copy link

jorrit commented Mar 25, 2018

I would like to comment that the docs should be updated to state that the unit for shmsize/tmpfs.Size is MB.

Edit: Of course I also want to thank you for adding this feature!

@sharanyad
Copy link
Contributor

@jorrit Thanks for reporting. The docs are updated now.

@jorrit
Copy link

jorrit commented Mar 26, 2018

Wonderful, thanks!

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

No branches or pull requests