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

Add ReadonlyRootfs option to the Docker driver #3802

Merged
merged 1 commit into from
Jan 29, 2018

Conversation

filipochnik
Copy link
Contributor

No description provided.

@alxark
Copy link

alxark commented Jan 27, 2018

damn i'm waiting for this commit in next release =) have you checked tmpfs mount in docker api ? it will be cool to have it with readonly root

@filipochnik
Copy link
Contributor Author

Maybe I'm missing something but can't you just use the mounts option? https://docs.docker.com/engine/admin/volumes/tmpfs/#use-a-tmpfs-mount-in-a-container

@alxark
Copy link

alxark commented Jan 28, 2018

TmpFs in docker API works a little bit different, it will copy content to tmpfs mount, while mount -t tmpfs will overwrite directory with empty tmpfs storage.

@dadgar dadgar merged commit d11fdc7 into hashicorp:master Jan 29, 2018
@dadgar
Copy link
Contributor

dadgar commented Jan 29, 2018

Thanks @filipochnik

@filipochnik filipochnik deleted the docker-readonly-rootfs branch January 30, 2018 08:45
@filipochnik
Copy link
Contributor Author

@alxark
Doesn't seem to be the case for me

$ docker version
Client:
 Version:	17.12.0-ce
 API version:	1.35
 Go version:	go1.9.2
 Git commit:	c97c6d6
 Built:	Wed Dec 27 20:03:51 2017
 OS/Arch:	darwin/amd64

Server:
 Engine:
  Version:	17.12.0-ce
  API version:	1.35 (minimum version 1.12)
  Go version:	go1.9.2
  Git commit:	c97c6d6
  Built:	Wed Dec 27 20:12:29 2017
  OS/Arch:	linux/amd64
  Experimental:	true
$ docker run busybox ls /var
spool
www
$ docker run --tmpfs /var busybox ls /var
$ docker run --mount type=tmpfs,target=/var busybox ls /var
$

Docs don't mention that either AFAICT.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants