[CONSUL-156] Create Dockerfile (Fortio) (#3)

pull/15235/head
Franco Bruno Lavayen 2 years ago committed by Jose Ignacio Lorenzo
parent 61bc874d2f
commit 8aeb464d42

@ -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" ]

@ -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`

Loading…
Cancel
Save