Skip to content

Commit

Permalink
[CONSUL-156] Create Dockerfile (Fortio) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolavayen authored and ezfepo committed Oct 5, 2022
1 parent 33f0b45 commit a37f59a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/connect/envoy/Dockerfile-fortio-windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/windows/nanoserver:1809

RUN mkdir fortio

ENV FORTIO_URL=https://github.com/fortio/fortio/releases/download/v1.33.0/fortio_win_1.33.0.zip
RUN curl %FORTIO_URL% -L -o fortio.zip

RUN tar -xf fortio.zip -C fortio

ENV PATH C:\\fortio;%PATH%

CMD [ "fortio.exe", "server" ]
15 changes: 15 additions & 0 deletions test/integration/connect/envoy/docker.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ If everything works properly you should get the following output:
20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] Loaded cert from file: name=www.example.com
20XX-XX-XXTXX:XX:XX.XXX-XXX [INFO] ==> SDS listening: addr=0.0.0.0:1234
```

## Dockerfile-fortio-windows

This file sole purpose is to build the custom Fortio image for Windows OS. To do this, the official [windows/nanoserver image](https://hub.docker.com/_/microsoft-windows-nanoserver) is used as base image.
To build this image you need to run the following command on your terminal:

`docker build -t fortio . -f Dockerfile-fortio-windows`

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

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

`docker run --rm -p 8080:8080 --name fortio fortio`

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

0 comments on commit a37f59a

Please sign in to comment.