-
Notifications
You must be signed in to change notification settings - Fork 595
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 "nanoserver" variants using "hello.txt" + powershell #24
Conversation
Docker@offcl-img-test MINGW64 ~/docker/hello-world ((3f49c5b...))
$ docker build hello-world/nanoserver
Sending build context to Docker daemon 3.584 kB
Step 1/3 : FROM microsoft/nanoserver
---> 787d9f9f8804
Step 2/3 : COPY hello.txt C:
---> 69b09b634328
Removing intermediate container 094565fb6465
Step 3/3 : CMD powershell -Command Get-Content C:\hello.txt
---> Running in c4c94d71997e
---> cabbfcafaf4c
Removing intermediate container c4c94d71997e
Successfully built cabbfcafaf4c
Docker@offcl-img-test MINGW64 ~/docker/hello-world ((3f49c5b...))
$ docker run --rm cabbfcafaf4c
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run a Nano Server container with:
$ docker run -it microsoft/nanoserver powershell
Share images, automate workflows, and more with a free Docker Hub account:
https://hub.docker.com
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
|
I believe you could even simplify the nano example further with "type hello.txt" :). |
@taylorb-microsoft heh, true -- although that's |
This looks fine to me! |
I'm all about using the smallest tool that fixes the job :)... PowerShell still takes an extra few ms to start beyond CMD... |
haha, this is cheating :-) |
@taylorb-microsoft yeah, fair -- I did some benchmarking to test:
So, uh, that result is pretty clear. I'm going to update this PR. 👍 |
Updated! |
@yosifkit made a good point in passing that helps rationalize this a little better -- if we decided to make the Linux variants |
- `haproxy`: 1.6.10 - `hello-seattle`: add `nanoserver` variant (docker-library/hello-world#24) - `hello-world`: add `nanoserver` variant (docker-library/hello-world#24) - `hola-mundo`: add `nanoserver` variant (docker-library/hello-world#24) - `percona`: 5.5.53-rel38.4-1.jessie - `ruby`: 2.3.3
@tianon is there any hope of making this a multi-arch image with a fat manifest? |
Closes #22
Closes #23
This implements the simpler txt-file-based method @yosifkit proposed in #23 (comment) for creating nanoserver variants. 👍