Skip to content

opts/mount: add tmpfs-specific options#28150

Merged
vieux merged 1 commit intomoby:masterfrom
AkihiroSuda:mounttmpcli
Nov 10, 2016
Merged

opts/mount: add tmpfs-specific options#28150
vieux merged 1 commit intomoby:masterfrom
AkihiroSuda:mounttmpcli

Conversation

@AkihiroSuda
Copy link
Member

- What I did

added following options for --mount (addendum to #26837):

  • tmpfs-size
  • tmpfs-mode

- How I did it

Updated opts/mount

- How to verify it

$ docker run -it --rm --mount type=tmpfs,target=/foo,tmpfs-size=1m busybox df /foo
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                     1024         0      1024   0% /foo
$ docker run -it --rm --mount type=tmpfs,target=/foo,tmpfs-mode=0700 busybox stat /foo
  File: /foo
  Size: 40              Blocks: 0          IO Block: 4096   directory
Device: 31h/49d Inode: 2           Links: 2
Access: (0700/drwx------)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-11-08 05:59:58.000000000
Modify: 2016-11-08 05:59:58.000000000
Change: 2016-11-08 05:59:58.000000000

- Description for the changelog

opts/mount: add tmpfs-specific options

- A picture of a cute animal (not mandatory but encouraged)

penguin

Signed-off-by: Akihiro Suda [email protected]

@AkihiroSuda
Copy link
Member Author

cc @stevvooe @cpuguy83

opts/mount.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any cases where one would not pass these as octal?

Copy link
Member Author

@AkihiroSuda AkihiroSuda Nov 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to test a few variations of octal mode bits. For example, 0700 and 700 will be different.

Copy link
Member Author

@AkihiroSuda AkihiroSuda Nov 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added following options:

 * tmpfs-size
 * tmpfs-mode

Signed-off-by: Akihiro Suda <[email protected]>
@vdemeester
Copy link
Member

Design SGTM 🐸

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevvooe
Copy link
Contributor

stevvooe commented Nov 9, 2016

LGTM

@cpuguy83
Copy link
Member

cpuguy83 commented Nov 9, 2016

ping @thaJeztah

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs LGTM!

@thaJeztah
Copy link
Member

Please wait with merging until #27967 is merged!

@vieux vieux merged commit 55543c4 into moby:master Nov 10, 2016
@GordonTheTurtle GordonTheTurtle added this to the 1.13.0 milestone Nov 10, 2016
@AkihiroSuda AkihiroSuda mentioned this pull request Nov 12, 2016
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants