-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Antoine Hamon
committed
May 24, 2024
1 parent
58315ed
commit be2734a
Showing
33 changed files
with
5,869 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
doc/ | ||
integration-toolbox-webserver | ||
LICENSE | ||
Makefile | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ARG GOLANG_VERSION=1.22 | ||
ARG ALPINE_VERSION=3.19 | ||
|
||
### | ||
# BUILD | ||
### | ||
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} as builder | ||
|
||
WORKDIR /app | ||
|
||
# copying sources | ||
COPY go.mod go.sum *.go ./ | ||
# compiling | ||
RUN go mod download | ||
RUN go build -o /integration-toolbox-webserver | ||
|
||
##### | ||
# Application | ||
##### | ||
FROM alpine:${ALPINE_VERSION} | ||
|
||
WORKDIR / | ||
|
||
# bin | ||
COPY --from=builder /integration-toolbox-webserver /usr/local/bin/integration-toolbox-webserver | ||
RUN apk add --no-cache curl libcap && \ | ||
setcap "cap_net_raw=+ep" /usr/local/bin/integration-toolbox-webserver | ||
|
||
# UI | ||
COPY ui /ui | ||
RUN chown -R nobody:nobody /ui | ||
|
||
EXPOSE 8080 | ||
USER nobody:nobody | ||
ENTRYPOINT ["/usr/local/bin/integration-toolbox-webserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
run: | ||
go run . | ||
|
||
build: | ||
@if [ -z "${version}" ]; then echo "ERROR :: Please define version variable"; exit 1; fi | ||
docker build -t kanshiroron/integration-toolbox-webserver:${version} -t kanshiroron/integration-toolbox-webserver:latest . | ||
|
||
.PHONY: run build |
Oops, something went wrong.