Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Feature Request: make vcpkg embeddable in docker image. #645

Closed
vlj opened this issue Feb 8, 2017 · 16 comments
Closed

Feature Request: make vcpkg embeddable in docker image. #645

vlj opened this issue Feb 8, 2017 · 16 comments
Labels
category:documentation To resolve the issue, documentation will need to be updated category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed

Comments

@vlj
Copy link
Contributor

vlj commented Feb 8, 2017

Currently vcpkg is not automatable : it prompts user before downloading various package like cmake or git and I didn't find a cli argument to always assume "yes". On the other hand docker image building process doesn't allow for user input which makes vcpkg installation impossible in a docker image as part of a "docker build" command.

I'm interested in having a docker image (based on windowsservercore) filled with various build tools to test build instruction from an almost vanilla dev installation.

@ras0219-msft
Copy link
Contributor

We have not documented this sufficiently, but you can automatically accept all prompts by creating a file inside downloads\ called AlwaysAllowEverything. It looks like someone else was successful in using us in docker here [1], which might help.

Let us know if you have any other issues; being usable in a docker container is definitely a goal!

[1] dicta/docker-configs@384b5d7

@ras0219-msft ras0219-msft added category:documentation To resolve the issue, documentation will need to be updated category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed labels Feb 8, 2017
@vlj
Copy link
Contributor Author

vlj commented Feb 9, 2017

there is 2 issues : one is that msbuild complain about missing sdk 10.0.240.0 (although it's installed as part of vs build tool 2015) when executing bootstrap.ps1 . It looks like it's a recent regression, a9f7fc6 worked.

Second one is that the Expand-ZIPFile function doesn't work when installing port, Something related to a nullptr. I will provide more information later when I'm getting acccess to my win 10 pro machine back

@alexkaratarakis
Copy link
Contributor

@vlj
I just pushed cfd5ada which improves the Win10 SDK detection.
Does it resolve the first issue?

@vlj
Copy link
Contributor Author

vlj commented Feb 10, 2017

Yes, I can confirm that with master the sdk is properly detected and vcpkg properly build.

@vlj
Copy link
Contributor Author

vlj commented Feb 11, 2017

With the following dockerfile (which embeds both msbuild and vcpkg docker img from dicta config files) :
https://gist.github.com/vlj/95e53e07c9f1fbd7bd4ff5120c7c6987

I have the following error :
https://gist.github.com/vlj/d073cc358eabf95338eee30874f34cec

@alexkaratarakis
Copy link
Contributor

@vlj
03b6548 may fix this (not the MinGit part of the commit, but the change in the Expand-ZIPFile function).

@vlj
Copy link
Contributor Author

vlj commented Feb 16, 2017

It still doesn't work :
https://gist.github.com/vlj/a839f593af2faca17a731263f9f39fd6

@curtnichols
Copy link

FWIW, I ran into Launching powershell failed or was denied running under a build server on Windows (and ended up on this issue via one of @vlj's gist mentioned above; added the error message here for searchability).

This suggestion above worked for me:

...you can automatically accept all prompts by creating a file inside downloads\ called AlwaysAllowEverything.

Thanks!

@KaungZawHtet
Copy link
Contributor

+1 to this!
vcpkg needs to be extremely small in docker container

@arthur-tacca
Copy link

I know this is not really the right place for this, but: Has anyone successfully bootstrapped vcpkg and built some ports in a Windows Docker container? If so, would they be kind enough to share their Dockerfile? The original issue that this issue is actually about has been resolved (there's a switch to turn off the prompt) - is there some other problem preventing vcpkg running in Docker?

@nfrechette
Copy link

I tried and failed. I run into this issue with any package I try to install inside a docker windows image: moby/moby#40266
I can run the image and install the packages fine, but they can't be built into the image which defeats the purpose :(

@ericoporto
Copy link

@arthur-tacca did you managed to do it? I am trying to figure out a minimal here #14883 but I have a bigger non-minimal there.

@BillyONeal
Copy link
Member

Now that #14883 is fixed is this still an issue?

@badpaybad
Copy link

I can run in docker linux with this dockerfile: https://github.com/badpaybad/cmakes-helloworld/blob/main/Dockerfile
But image too big, It over 5GB
How to make it smaller?
Can we delete folder vcpkg after we: RUN cmake --build . ???

@BillyONeal
Copy link
Member

Can we delete folder vcpkg after we: RUN cmake --build . ???

You can delete buildtrees and packages but you need installed.

@PhoebeHui
Copy link
Contributor

Since we don't have docs for this, convert it to discussion.

@microsoft microsoft locked and limited conversation to collaborators Oct 13, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
category:documentation To resolve the issue, documentation will need to be updated category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed
Projects
None yet
Development

No branches or pull requests