Skip to content

Commit

Permalink
[CONSUL-145] Support windows consul-envoy from envoyproxy/envoy (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ezfepo committed Sep 8, 2022
1 parent c63c528 commit 5877849
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Note this arg has to be before the first FROM
ARG ENVOY_VERSION=1.22-latest

FROM windows/consul-dev as consul

FROM docker.mirror.hashicorp.services/windows/envoy-windows:v${ENVOY_VERSION}
COPY --from=consul C:\\consul C:\\consul
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.3-nanoserver-1809
FROM golang:1.18.1-nanoserver-1809

WORKDIR /go/src
COPY ./ .
Expand Down
22 changes: 22 additions & 0 deletions test/integration/connect/envoy/docker.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
- [About](#about-this-file)
- [Pre-requisites](#pre-requisites)
- [Dockerfile-bats-windows](#dockerfile-bats-windows)
- [Dockerfile-consul-envoy-windows](#dockerfile-consul-envoy-windows)
- [Dockerfile-test-sds-server-windows](#dockerfile-test-sds-server-windows)

## About this File

In this file you will find which Dockerfiles are needed to run the Envoy integration tests on Windows, as well as information on how to run each of these files individually for testing purposes.

## Pre-requisites

After building and running the images and containers, you need to have pre-built the base images used by these Dockerfiles. See [pre-built images required in Windows](../../../../build-support-windows/docker.windows.md)

## Dockerfile-bats-windows
Expand Down Expand Up @@ -45,6 +47,26 @@ verify_2.bats
4 tests, 0 failures, 1 skipped
```

## Dockerfile-consul-envoy-windows

This Dockerfile allows to build a envoyproxy custom image for Windows OS. This uses as base a pre-built image of [envoyproxy/envoy-windows](https://hub.docker.com/r/envoyproxy/envoy-windows). Check [Pre-requisites](#pre-requisites) section for more information.

To build this image you need to run the following command on your terminal:

```shell
docker build -t consul-dev-envoy . -f Dockerfile-consul-envoy-windows
```

This is the same command used in run-tests.sh

You can test the built file by running the following command:

```shell
docker run --rm -p 9901:9901 --name envoyproxy consul-envoy
```

If everything works properly you should openning the browser and check that the Envoy server running on: `http://localhost:9901`

## Dockerfile-test-sds-server-windows

This file sole purpose is to build the test-sds-server executable using Go. To do so, we use an official [golang image](https://hub.docker.com/_/golang/) provided in docker hub with Windows nano server.
Expand Down

0 comments on commit 5877849

Please sign in to comment.