Skip to content

Commit

Permalink
first version
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Hamon committed May 24, 2024
1 parent 58315ed commit be2734a
Show file tree
Hide file tree
Showing 33 changed files with 5,869 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
doc/
integration-toolbox-webserver
LICENSE
Makefile
README.md
35 changes: 35 additions & 0 deletions Dockerfile
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"]
8 changes: 8 additions & 0 deletions Makefile
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
Loading

0 comments on commit be2734a

Please sign in to comment.