diff --git a/CHANGELOG.md b/CHANGELOG.md index 30a32f7..b464d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Added - New highly configurable statuscode option for cyclic bad segment request responses +- Dockerfile to build a minimal Docker image with sample test content ## Changed diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..45ffd02 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Two-stage Docker-file to build a small livesim2 image +# The test content content is copied to /vod and will be used +# To enable HTTPS with fixed certificate + key, +# add files and speficy options to read them + +# Build as "docker build -t livesim2 ." +# Run as "docker run -p 8888:8888 livesim2" + +# Build Stage +FROM golang:1.21.3-alpine3.18 AS BuildStage +WORKDIR /work +COPY . . +RUN go mod download +RUN go build -o ./out/livesim2 ./cmd/livesim2/main.go +# Deploy Stage +FROM alpine:latest +WORKDIR / +COPY --from=BuildStage /work/out/ / +COPY --from=BuildStage /work/cmd/livesim2/app/testdata/assets /vod +EXPOSE 8888 +ENTRYPOINT ["/livesim2", "--logformat", "json"] \ No newline at end of file