-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simple Dockerfile to build a small livesim2 image including sam…
…ple test content
- Loading branch information
Showing
2 changed files
with
22 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
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,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"] |