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

Access denied using this image in a multistage build #1

Open
EPinci opened this issue May 4, 2019 · 1 comment
Open

Access denied using this image in a multistage build #1

EPinci opened this issue May 4, 2019 · 1 comment

Comments

@EPinci
Copy link

EPinci commented May 4, 2019

Hi,

I'm trying to use this image in a multi stage build dockerfile.
Since my build containers cannot access docker, I have put something like this:

FROM knsit/docfx:latest AS docfx
WORKDIR /cnt
COPY "BCDocs/Content" .
RUN docfx

in my dockerfile to pull out later the compiled content.
But when it gets to executing the command, docfx errors out with:
Error:System.UnauthorizedAccessException: Access to the path "/cnt/obj" is denied.

Is there a way to make it work this way?

Thank you!

@prskr
Copy link
Contributor

prskr commented May 5, 2019

Hey,

My first guess would be a privilege issue.

The image uses per default an unpriviledged user docfx to run the commands. Directories under / are normally owned by root which means that that the docfx user won't be allowed to create new files or directories in your working directory.

Did you try something like the following snippet?

FROM knsit/docfx:latest AS docfx
WORKDIR /cnt

USER root

COPY "BCDocs/Content" .
RUN docfx

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

No branches or pull requests

2 participants