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

Windows docker container buildctl does not allow mounting secrets. It fails mounting to linux tmpfs location #5273

Open
lorentz-1 opened this issue Aug 27, 2024 · 2 comments

Comments

@lorentz-1
Copy link

I am using version 1.7.18 of containerd and 0.14.0 of buildkit.
When creating a docker image from docker file using the following command

buildctl.exe build
--frontend dockerfile.v0
--local context=.
--local dockerfile=.
--output type=image,\"name=test_image:1.0\"
--secret id=creds-usr,env=CREDS_USR
--secret id=creds-psw,env=CREDS_PSW
${buildArgs.join(' ')}


I have the following dockerfile

FROM mcr.microsoft.com/windows/servercore
RUN --mount=type=secret,id=creds-usr,required=True,target=C:\secrets\creds-usr
--mount=type=secret,id=creds-psw,required=True,target=C:\secrets\creds-psw
//Followed by other commands I use to perform network operations.


The build output fails at following error
unable to setup secret mount: invalid windows mount type: 'tmpfs'

Has any one has success is mounting secrets using windows containers?

Originally posted by @lorentz-1 in #5272

@lilayam
Copy link

lilayam commented Sep 5, 2024

I encountered this bug. Was hoping someone would fix it or propose some ways to fix this

@profnandaa
Copy link
Collaborator

Currently RUN --mount is not supported on Windows. Current mount types are Linux specific, like tmpfs.
We are yet to look into the design of this feature but it's good to see that there's demand for it, so this will help in our prioritization.

However, currently, the aim is to have full parity with the classic builder (current docker build for Windows) first.

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

5 participants
@profnandaa @lilayam @lorentz-1 and others