chore: create httpbun image (#9926)

Signed-off-by: Spazzy <brendankamp757@gmail.com>
This commit is contained in:
Brendan Kamp 2023-05-05 14:27:13 +02:00 committed by GitHub
parent f48b03be54
commit 6d91c2a54c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 19 deletions

View file

@ -395,8 +395,8 @@ jobs:
- 'images/echo/**'
go-grpc-greeter-server:
- 'images/go-grpc-greeter-server/**'
httpbin:
- 'images/httpbin/**'
httpbun:
- 'images/httpbun/**'
kube-webhook-certgen:
- 'images/kube-webhook-certgen/**'
ext-auth-example-authsvc:
@ -422,10 +422,10 @@ jobs:
if: ${{ steps.filter-images.outputs.go-grpc-greeter-server == 'true' }}
run: |
cd images/go-grpc-greeter-server && make build
- name: httpbin image build
- name: httpbun image build
if: ${{ steps.filter-images.outputs.httpbin == 'true' }}
run: |
cd images/httpbin && make build
cd images/httpbun && make build
- name: kube-webhook-certgen image build
if: ${{ steps.filter-images.outputs.kube-webhook-certgen == 'true' }}
run: |

View file

@ -17,6 +17,7 @@ custom-error-pages | Example of Custom error pages for the NGINX Ingress control
e2e | Image to run e2e tests
fastcgi-helloserver | FastCGI application for e2e tests
grpc-fortune-teller | grpc server application for the nginx-ingress grpc example
httpbin | A simple HTTP Request & Response Service for e2e tests
httpbun | A simple HTTP Request & Response Service for e2e tests
httpbin | [Removed] we are no longer maintaining the httpbin image due to project being unmaintained
nginx | NGINX base image using [alpine linux](https://www.alpinelinux.org)
cfssl | Image to run cfssl commands

View file

@ -23,7 +23,7 @@ TAG ?=v$(shell date +%Y%m%d)-$(SHORT_SHA)
REGISTRY ?= local
IMAGE = $(REGISTRY)/e2e-test-httpbin
IMAGE = $(REGISTRY)/e2e-test-httpbun
# required to enable buildx
export DOCKER_CLI_EXPERIMENTAL=enabled

View file

@ -18,7 +18,7 @@ steps:
- -c
- |
gcloud auth configure-docker \
&& cd images/httpbin && make push
&& cd images/httpbun && make push
substitutions:
_GIT_TAG: "12345"
_PULL_BASE_REF: "master"

View file

@ -12,21 +12,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM alpine:3.17.2
FROM golang:1.20 AS builder
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV HTTPBUN_COMMIT=a6b387c438b664322734250e426b6966966c2fe4
RUN apk upgrade && apk update \
&& apk add --no-cache \
python3 python3-dev \
musl-dev gcc g++ make \
libffi libffi-dev libstdc++ \
py3-gevent py3-gunicorn py3-wheel \
py3-pip \
&& pip3 install httpbin \
&& apk del python3-dev musl-dev gcc g++ make libffi-dev
RUN git clone https://github.com/sharat87/httpbun.git
WORKDIR httpbun
RUN git checkout $HTTPBUN_COMMIT
RUN CGO_ENABLED=0 GOOS=linux go build \
-installsuffix cgo \
-trimpath \
-o bin/httpbun .
FROM scratch
COPY --from=builder /go/httpbun/bin/httpbun httpbun
ENV HTTPBUN_BIND=0.0.0.0:80
EXPOSE 80
CMD ["gunicorn", "-b", "0.0.0.0:80", "httpbin:app", "-k", "gevent"]
ENTRYPOINT ["/httpbun"]