2023-12-01 17:32:19 +00:00
|
|
|
FROM alpine:3.12 as builder
|
2015-07-23 01:49:26 +00:00
|
|
|
|
2021-10-13 18:00:37 +00:00
|
|
|
# Install utilities, libraries, and dev tools.
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
bash curl \
|
2023-12-01 17:32:19 +00:00
|
|
|
bsd-compat-headers linux-headers \
|
|
|
|
build-base cmake git ninja python3
|
2021-10-13 18:00:37 +00:00
|
|
|
|
|
|
|
# Build shaka-packager from the current directory, rather than what has been
|
|
|
|
# merged.
|
2023-12-01 17:32:19 +00:00
|
|
|
WORKDIR shaka-packager
|
|
|
|
COPY . /shaka-packager/
|
|
|
|
RUN rm -rf build
|
|
|
|
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -G Ninja
|
|
|
|
RUN cmake --build build/ --config Debug --parallel
|
2018-12-19 19:45:40 +00:00
|
|
|
|
|
|
|
# Copy only result binaries to our final image.
|
2023-12-01 17:32:19 +00:00
|
|
|
FROM alpine:3.12
|
|
|
|
RUN apk add --no-cache libstdc++ python3
|
|
|
|
COPY --from=builder /shaka-packager/build/packager/packager \
|
|
|
|
/shaka-packager/build/packager/mpd_generator \
|
|
|
|
/shaka-packager/build/packager/pssh-box.py \
|
2018-12-19 19:45:40 +00:00
|
|
|
/usr/bin/
|
2023-12-01 17:32:19 +00:00
|
|
|
|
2018-12-20 21:26:10 +00:00
|
|
|
# Copy pyproto directory, which is needed by pssh-box.py script. This line
|
|
|
|
# cannot be combined with the line above as Docker's copy command skips the
|
|
|
|
# directory itself. See https://github.com/moby/moby/issues/15858 for details.
|
2023-12-01 17:32:19 +00:00
|
|
|
COPY --from=builder /shaka-packager/build/packager/pssh-box-protos \
|
|
|
|
/usr/bin/pssh-box-protos
|