From 66ab653911734f07652be8c7bfc9888e86f30b0f Mon Sep 17 00:00:00 2001 From: Anuraag Agrawal Date: Thu, 10 Nov 2022 23:30:58 +0900 Subject: [PATCH] Replace httpbin with go-httpbin (#77) --- ftw/docker-compose.yml | 2 +- ftw/envoy-config-nowasm.yaml | 2 +- ftw/envoy-config.yaml | 2 +- ftw/httpbin/Dockerfile | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 ftw/httpbin/Dockerfile diff --git a/ftw/docker-compose.yml b/ftw/docker-compose.yml index 2c961dec8db44..f58f73b6703ac 100644 --- a/ftw/docker-compose.yml +++ b/ftw/docker-compose.yml @@ -1,6 +1,6 @@ services: httpbin: - image: kennethreitz/httpbin:latest + build: httpbin chown: image: alpine:3.16 command: diff --git a/ftw/envoy-config-nowasm.yaml b/ftw/envoy-config-nowasm.yaml index ac3a3c357ab1e..423cf94abd593 100644 --- a/ftw/envoy-config-nowasm.yaml +++ b/ftw/envoy-config-nowasm.yaml @@ -41,4 +41,4 @@ static_resources: address: socket_address: address: httpbin - port_value: 80 + port_value: 8080 diff --git a/ftw/envoy-config.yaml b/ftw/envoy-config.yaml index 936c4533d7edf..492946c5468f0 100644 --- a/ftw/envoy-config.yaml +++ b/ftw/envoy-config.yaml @@ -66,4 +66,4 @@ static_resources: address: socket_address: address: httpbin - port_value: 80 + port_value: 8080 diff --git a/ftw/httpbin/Dockerfile b/ftw/httpbin/Dockerfile new file mode 100644 index 0000000000000..ef1fb37f9946e --- /dev/null +++ b/ftw/httpbin/Dockerfile @@ -0,0 +1,10 @@ +# Copyright The OWASP Coraza contributors +# SPDX-License-Identifier: Apache-2.0 + +# TODO(anuraaga): Remove this Dockerfile once a new version of the official image is released +FROM golang:1.19-alpine + +# https://github.com/mccutchen/go-httpbin/pull/89 +RUN go install github.com/anuraaga/go-httpbin/v2/cmd/go-httpbin@b16c71528bc1cf626f122fc528652e435ce20b85 + +CMD ["go-httpbin"]