forked from hashicorp/consul
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CONSUL-441] Update windows dockerfile with version (#62)
- Loading branch information
1 parent
44bedd0
commit 9e181fe
Showing
20 changed files
with
300 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM mcr.microsoft.com/windows/servercore:1809 | ||
ENV VERSION=1.12.0 | ||
FROM docker.mirror.hashicorp.services/windows/servercore:1809 | ||
ARG VERSION=1.13.1 | ||
|
||
LABEL org.opencontainers.image.authors="Consul Team <[email protected]>" \ | ||
org.opencontainers.image.url="https://www.consul.io/" \ | ||
|
@@ -8,7 +8,8 @@ LABEL org.opencontainers.image.authors="Consul Team <[email protected]>" \ | |
org.opencontainers.image.version=$VERSION \ | ||
org.opencontainers.image.vendor="HashiCorp" \ | ||
org.opencontainers.image.title="consul" \ | ||
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." | ||
org.opencontainers.image.description="Consul is a datacenter runtime that provides service discovery, configuration, and orchestration." \ | ||
version=${VERSION} | ||
|
||
RUN ["powershell", "Set-ExecutionPolicy", "Bypass", "-Scope", "Process", "-Force;"] | ||
RUN ["powershell", "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ARG VERSION=1.13.1 | ||
|
||
FROM windows/consul:${VERSION}-local | ||
COPY dist/ C:\\consul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ../ | ||
rm -rf dist | ||
|
||
export GOOS=windows GOARCH=amd64 | ||
VERSION=1.13.1 | ||
CONSUL_BUILDDATE=$(date +"%Y-%m-%dT%H:%M:%SZ") | ||
GIT_IMPORT=github.com/hashicorp/consul/version | ||
GOLDFLAGS=" -X $GIT_IMPORT.Version=$VERSION -X $GIT_IMPORT.VersionPrerelease=dev -X $GIT_IMPORT.BuildDate=$CONSUL_BUILDDATE " | ||
|
||
go build -ldflags "$GOLDFLAGS" -o ./dist/ . | ||
|
||
docker build -t windows/consul:${VERSION}-dev -f ./build-support-windows/Dockerfile-consul-dev-windows . --build-arg VERSION=${VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
|
||
readonly HASHICORP_DOCKER_PROXY="docker.mirror.hashicorp.services" | ||
|
||
# Build Consul Version 1.13.1 / 1.12.4 / 1.11.8 | ||
VERSION=${VERSION:-"1.13.1"} | ||
export VERSION | ||
|
||
echo "Building Images" | ||
|
||
|
||
# Pull Windows Servercore image | ||
echo " " | ||
echo "Pull Windows Servercore image" | ||
docker pull mcr.microsoft.com/windows/servercore:1809 | ||
# Tag Windows Servercore image | ||
echo " " | ||
echo "Tag Windows Servercore image" | ||
docker tag mcr.microsoft.com/windows/servercore:1809 "${HASHICORP_DOCKER_PROXY}/windows/servercore:1809" | ||
|
||
|
||
# Pull Windows Nanoserver image | ||
echo " " | ||
echo "Pull Windows Nanoserver image" | ||
docker pull mcr.microsoft.com/windows/nanoserver:1809 | ||
# Tag Windows Nanoserver image | ||
echo " " | ||
echo "Tag Windows Nanoserver image" | ||
docker tag mcr.microsoft.com/windows/nanoserver:1809 "${HASHICORP_DOCKER_PROXY}/windows/nanoserver:1809" | ||
|
||
|
||
# Pull Windows OpenJDK image | ||
echo " " | ||
echo "Pull Windows OpenJDK image" | ||
docker pull openjdk:windowsservercore-1809 | ||
# Tag Windows OpenJDK image | ||
echo " " | ||
echo "Tag Windows OpenJDK image" | ||
docker tag openjdk:windowsservercore-1809 "${HASHICORP_DOCKER_PROXY}/windows/openjdk:1809" | ||
|
||
# Pull Windows Golang image | ||
echo " " | ||
echo "Pull Windows Golang image" | ||
docker pull golang:1.18.1-nanoserver-1809 | ||
# Tag Windows Golang image | ||
echo " " | ||
echo "Tag Windows Golang image" | ||
docker tag golang:1.18.1-nanoserver-1809 "${HASHICORP_DOCKER_PROXY}/windows/golang:1809" | ||
|
||
|
||
# Pull Kubernetes/pause image | ||
echo " " | ||
echo "Pull Kubernetes/pause image" | ||
docker pull mcr.microsoft.com/oss/kubernetes/pause:3.6 | ||
# Tag Kubernetes/pause image | ||
echo " " | ||
echo "Tag Kubernetes/pause image" | ||
docker tag mcr.microsoft.com/oss/kubernetes/pause:3.6 "${HASHICORP_DOCKER_PROXY}/windows/kubernetes/pause" | ||
|
||
|
||
# Build Windows Openzipkin Image | ||
docker build -t "${HASHICORP_DOCKER_PROXY}/windows/openzipkin" -f Dockerfile-openzipkin-windows . | ||
|
||
|
||
# Build Windows Test sds server Image | ||
./build-test-sds-server-image.sh | ||
|
||
|
||
# Build windows/consul:${VERSION} Image | ||
echo " " | ||
echo "Build windows/consul:${VERSION} Image" | ||
docker build -t "windows/consul:${VERSION}" -f ../Dockerfile-windows ../ --build-arg VERSION=${VERSION} | ||
|
||
|
||
# Build windows/consul:${VERSION}-local Image | ||
echo " " | ||
echo "Build windows/consul:${VERSION}-local Image" | ||
docker build -t windows/consul:${VERSION}-local -f ./Dockerfile-consul-local-windows . --build-arg VERSION=${VERSION} | ||
|
||
echo "Building Complete!" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
cd ../test/integration/connect/envoy | ||
|
||
docker build -t windows/test-sds-server -f ./Dockerfile-test-sds-server-windows test-sds-server |
Oops, something went wrong.