Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile to build a small livesim2 image including sample test content #132

Merged
merged 1 commit into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Added

- New highly configurable `statuscode`` parameter for cyclic bad segment request responses
- New highly configurable `statuscode` parameter for cyclic bad segment request responses
- New URL parameter `traffic` to simulate periodic issues with fetching
segments. Supports multiple parallel BaseURLs.
- 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"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ More information can be found in the [deployment/README.md](deployment/README.md
To get information about the available assets and other information
access the server's root URL.

### Docker

A simple `Dockerfile` is also provided. It builds a stand-alone livesim2
image bundled with the test content that is provided in this repo.
Some comments are included in the Dockerfile. Check the options of livesim2
to find out how to add other content, HTTPs etc.

## List of functionality and options

The URL parameters are now listed on this project's Wiki page
Expand Down