Skip to content

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

@lorentz-1

Description

@lorentz-1

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions