Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 0412d5b

Browse files
committed
Use official golang, fix trailing space
1 parent 94ddff6 commit 0412d5b

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

windows/registry/Dockerfile.builder

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# escape=`
22

3-
# REMARK - when Go 1.8 is released we can use an official image for the base.
4-
# There is an issue with Go 1.7 and Windows 2016 SYMLINKD directories which causes Docker volumes and host mounts to fail.
5-
# This registry build uses a custom build of Go (@a2bd5c5) from the master branch to fix - https://github.com/golang/go/issues/15978
6-
7-
FROM sixeyed/golang:windowsservercore
3+
FROM golang:windowsservercore
84
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
95

10-
CMD .\go get github.com/docker/distribution/cmd/registry ; `
6+
CMD go get github.com/docker/distribution/cmd/registry ; `
117
cp \"$env:GOPATH\bin\registry.exe\" c:\out\ ; `
128
cp \"$env:GOPATH\src\github.com\docker\distribution\cmd\registry\config-example.yml\" c:\out\config.yml
139

windows/registry/part-1.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ The Dockerfile for the registry builder is in [Dockerfile.builder](Dockerfile.bu
2222

2323
```Dockerfile
2424
# escape=`
25-
FROM sixeyed/golang:windowsservercore
25+
FROM golang:nanoserver
2626
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
2727
```
2828

29-
The base image is [sixeyed/golang](https://store.docker.com/community/images/sixeyed/golang) which is in the Docker Store, built from [this Dockerfile](https://github.com/sixeyed/dockers-windows/blob/master/golang/Dockerfile). It has the Go toolset installed, but rather than using a released version, it builds Go from the source on GitHub to get the latest features.
30-
31-
> Note. There is an [official Go image](https://store.docker.com/images/golang) on Docker Store, which has Windows Server Core and Nano Server variants. That uses the latest release of Go - 1.7 - which has [an issue](https://github.com/golang/go/issues/15978) that stops you using Docker volumes on Windows. It's fixed in the latest source code, which is why we use an image that builds from source, but when Go 1.8 is released we can switch to using the official image as the base for the builder.
29+
The base image is the [official Go image](https://store.docker.com/images/golang) which is in the Docker Store.
3230

3331
There's a single `CMD` instruction to build the latest version of the registry and copy the built files to a known output ___location:
3432

3533
```Dockerfile
36-
CMD .\go get github.com/docker/distribution/cmd/registry ; `
34+
CMD .\go get github.com/docker/distribution/cmd/registry ; `
3735
cp \"$env:GOPATH\bin\registry.exe\" c:\out\ ; `
3836
cp \"$env:GOPATH\src\github.com\docker\distribution\cmd\registry\config-example.yml\" c:\out\config.yml
3937
```
@@ -44,7 +42,7 @@ When we run a container from the builder image, it will compile the latest regis
4442

4543
First we build the builder image - all the images in this lab use [microsoft/windowsservercore](https://store.docker.com/images/windowsservercore) or [microsoft/nanoserver](https://store.docker.com/images/nanoserver) as the base images, so you can only use a Windows host to build and run them. From a PowerShell session, navigate to the lab folder and build the builder:
4644

47-
```PowerShell
45+
```PowerShell
4846
docker build -t registry-builder -f Dockerfile.builder .
4947
```
5048

0 commit comments

Comments
 (0)