Skip to content

Commit

Permalink
feat: simple Dockerfile to build a small livesim2 image including sam…
Browse files Browse the repository at this point in the history
…ple test content
  • Loading branch information
tobbee committed Oct 29, 2023
1 parent 3d85b30 commit 825093d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 825093d

Please sign in to comment.