Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all:
I modified the Dockerfile a bit to make it more consistent
as the docker documentation says: If the WORKDIR doesn’t exist, it will be created, so there is no need to use
RUN mkdir /app
apk update
is useless since we have already added --no-cache inapk add --no-cache gcc build-base linux-headers
, if keepapk update
it just make image size bigger, to prove this, I do it on a alpine containerjust run
apk add --no-cache gcc build-base linux-headers
run
apk update && apk add --no-cache gcc build-base linux-headers
it produce index files , we don't need this in our image
and we can save 2MB disk sapce
we can Minimize the number of layers by merge some command with &&
to test it works or not, I packed a config.json into image,
docker build -t owncast/owncast:v0.2 .
and then run
docker container run --rm -p 8082:8080 -p 1937:1935 -v d:\\config.yaml:/config.yaml owncast/owncast:v0.2
the output it produces is
and go to http://localhost:8082/ , it works!