mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Modify Dockerfile to update the package lists before installing
- Also added usage examples
This commit is contained in:
parent
280f506700
commit
292660d73f
31
Dockerfile
31
Dockerfile
|
@ -1,29 +1,42 @@
|
||||||
# A simple Dockerfile for building Kvazaar from the git repository
|
# A simple Dockerfile for building Kvazaar from the git repository
|
||||||
# Example build command when in this directory: docker build -t kvazaar .
|
# Example build command when in this directory: docker build -t kvazaar .
|
||||||
|
#
|
||||||
|
# Example usage
|
||||||
|
# Run with an input YUV file and output HEVC binary file
|
||||||
|
# docker run -i -a STDIN -a STDOUT kvazaar -i - --input-res=320x240 -o - < testfile_320x240.yuv > out.265
|
||||||
|
#
|
||||||
|
# Use libav or ffmpeg to input (almost) any format and convert it to YUV420 for kvazaar, audio is disabled
|
||||||
|
#
|
||||||
|
# RESOLUTION=`avconv -i input.avi 2>&1 | grep Stream | grep -oP ', \K[0-9]+x[0-9]+'`
|
||||||
|
# avconv -i input.avi -an -f rawvideo -pix_fmt yuv420p - | docker run -i -a STDIN -a STDOUT kvazaar -i - --wpp --threads=8 --input-res=$RESOLUTION --preset=ultrafast -o - > output.265
|
||||||
|
# or
|
||||||
|
# RESOLUTION=`ffmpeg -i input.avi 2>&1 | grep Stream | grep -oP ', \K[0-9]+x[0-9]+'`
|
||||||
|
# ffmpeg -i input.avi -an -f rawvideo -pix_fmt yuv420p - | docker run -i -a STDIN -a STDOUT kvazaar -i - --wpp --threads=8 --input-res=$RESOLUTION --preset=ultrafast -o - > output.265
|
||||||
|
#
|
||||||
|
|
||||||
# Use Ubuntu 15.10 as a base for now, it's around 136MB
|
# Use Ubuntu 15.10 as a base for now, it's around 136MB
|
||||||
FROM ubuntu:15.10
|
FROM ubuntu:15.10
|
||||||
|
|
||||||
|
MAINTAINER Marko Viitanen <fador@iki.fi>
|
||||||
|
|
||||||
# List of needed packages to be able to build kvazaar with autotools
|
# List of needed packages to be able to build kvazaar with autotools
|
||||||
ENV REQUIRED_PACKAGES automake autoconf libtool m4 build-essential git yasm
|
ENV REQUIRED_PACKAGES automake autoconf libtool m4 build-essential git yasm
|
||||||
|
|
||||||
# Running update causes extra data to be stored in the image
|
|
||||||
# We don't need to update right now.
|
|
||||||
#RUN apt-get update
|
|
||||||
|
|
||||||
# Run all the commands in one RUN so we don't have any extra history
|
# Run all the commands in one RUN so we don't have any extra history
|
||||||
# data in the image.
|
# data in the image.
|
||||||
RUN apt-get install -y $REQUIRED_PACKAGES ; \
|
RUN apt-get update \
|
||||||
git clone --depth=1 git://github.com/ultravideo/kvazaar.git; \
|
&& apt-get install -y $REQUIRED_PACKAGES \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& git clone --depth=1 git://github.com/ultravideo/kvazaar.git; \
|
||||||
cd kvazaar; \
|
cd kvazaar; \
|
||||||
./autogen.sh; \
|
./autogen.sh; \
|
||||||
./configure --disable-shared;\
|
./configure --disable-shared;\
|
||||||
make;\
|
make;\
|
||||||
AUTOINSTALLED_PACKAGES=`apt-mark showauto`; \
|
AUTOINSTALLED_PACKAGES=`apt-mark showauto`; \
|
||||||
apt-get remove --purge -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES; \
|
apt-get remove --purge --force-yes -y $REQUIRED_PACKAGES $AUTOINSTALLED_PACKAGES; \
|
||||||
|
apt-get clean autoclean; \
|
||||||
apt-get autoremove -y; \
|
apt-get autoremove -y; \
|
||||||
apt-get clean all; \
|
rm -rf /var/lib/{apt,dpkg,cache,log}/
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
# Because we build only the static binary, copy that to the root
|
# Because we build only the static binary, copy that to the root
|
||||||
COPY src/kvazaar /
|
COPY src/kvazaar /
|
||||||
ENTRYPOINT ["/kvazaar"]
|
ENTRYPOINT ["/kvazaar"]
|
||||||
|
|
Loading…
Reference in a new issue