asf
This commit is contained in:
parent
9ceadc6e97
commit
6558a6ed78
4 changed files with 19 additions and 22 deletions
2
Makefile
2
Makefile
|
|
@ -28,7 +28,7 @@ wheel: clean
|
||||||
pip3 install build
|
pip3 install build
|
||||||
python3 -m build
|
python3 -m build
|
||||||
docker_stage: wheel
|
docker_stage: wheel
|
||||||
cp dist/*.whl docker/root/ytdl-sub.whl
|
cp dist/*.whl docker/root/
|
||||||
cp -R examples docker/root/defaults/
|
cp -R examples docker/root/defaults/
|
||||||
docker: docker_stage
|
docker: docker_stage
|
||||||
sudo docker build --progress=plain --no-cache -t ytdl-sub:local docker/
|
sudo docker build --progress=plain --no-cache -t ytdl-sub:local docker/
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,10 @@ RUN mkdir -p /config && \
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then \
|
if [[ $(uname -m) == "x86_64" ]]; then \
|
||||||
echo "installing phantomjs" && \
|
echo "installing phantomjs" && \
|
||||||
apk add --no-cache gcompat && \
|
apk add --no-cache gcompat && \
|
||||||
cd /defaults && \
|
tar -xjvf /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/share/phantomjs && \
|
||||||
mv /defaults/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/share/phantomjs && \
|
rm -rf phantomjs-2.1.1-linux-x86_64 && \
|
||||||
rm -rf /defaults/phantomjs-2.1.1-linux-x86_64 && \
|
rm /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
rm phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
|
||||||
ln -s /usr/share/phantomjs /usr/bin/phantomjs && \
|
ln -s /usr/share/phantomjs /usr/bin/phantomjs && \
|
||||||
echo "Phantom JS version:" && \
|
echo "Phantom JS version:" && \
|
||||||
phantomjs --version && \
|
phantomjs --version && \
|
||||||
|
|
@ -44,10 +43,10 @@ RUN mkdir -p /config && \
|
||||||
fi && \
|
fi && \
|
||||||
echo "hi" && \
|
echo "hi" && \
|
||||||
# Install ytdl-sub, ensure it is installed properly
|
# Install ytdl-sub, ensure it is installed properly
|
||||||
python3 -m pip install --break-system-packages --no-cache-dir ytdl-sub.whl && \
|
python3 -m pip install --break-system-packages --no-cache-dir ytdl_sub-*.whl && \
|
||||||
ytdl-sub -h && \
|
ytdl-sub -h && \
|
||||||
# Delete unneeded packages after install
|
# Delete unneeded packages after install
|
||||||
rm ytdl-sub.whl && \
|
rm ytdl_sub-*.whl && \
|
||||||
apk del \
|
apk del \
|
||||||
g++ \
|
g++ \
|
||||||
make \
|
make \
|
||||||
|
|
|
||||||
|
|
@ -52,19 +52,18 @@ RUN mkdir -p /config && \
|
||||||
# Install phantomjs if using x86_64, ensure it is properly installed
|
# Install phantomjs if using x86_64, ensure it is properly installed
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then \
|
if [[ $(uname -m) == "x86_64" ]]; then \
|
||||||
echo "installing phantomjs" && \
|
echo "installing phantomjs" && \
|
||||||
cd /defaults && \
|
tar -xjvf /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && \
|
||||||
mv /defaults/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && \
|
rm -rf phantomjs-2.1.1-linux-x86_64 && \
|
||||||
rm -rf /defaults/phantomjs-2.1.1-linux-x86_64 && \
|
rm /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
rm phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
|
||||||
echo "Phantom JS version:" && \
|
echo "Phantom JS version:" && \
|
||||||
phantomjs --version ; \
|
phantomjs --version ; \
|
||||||
fi && \
|
fi && \
|
||||||
# Install ytdl-sub, ensure it is installed properly
|
# Install ytdl-sub, ensure it is installed properly
|
||||||
pip install --no-cache-dir --break-system-packages ytdl-sub.whl && \
|
pip install --no-cache-dir --break-system-packages ytdl_sub-*.whl && \
|
||||||
ytdl-sub -h && \
|
ytdl-sub -h && \
|
||||||
# Delete unneeded packages after install
|
# Delete unneeded packages after install
|
||||||
rm ytdl-sub.whl && \
|
rm ytdl_sub-*.whl && \
|
||||||
apt-get remove -y \
|
apt-get remove -y \
|
||||||
g++ \
|
g++ \
|
||||||
make \
|
make \
|
||||||
|
|
|
||||||
|
|
@ -55,19 +55,18 @@ RUN mkdir -p /config && \
|
||||||
# Install phantomjs if using x86_64, ensure it is properly installed
|
# Install phantomjs if using x86_64, ensure it is properly installed
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then \
|
if [[ $(uname -m) == "x86_64" ]]; then \
|
||||||
echo "installing phantomjs" && \
|
echo "installing phantomjs" && \
|
||||||
cd /defaults && \
|
tar -xjvf /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
tar -xjvf phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
mv phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && \
|
||||||
mv /defaults/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs && \
|
rm -rf phantomjs-2.1.1-linux-x86_64 && \
|
||||||
rm -rf /defaults/phantomjs-2.1.1-linux-x86_64 && \
|
rm /defaults/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
||||||
rm phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
|
|
||||||
echo "Phantom JS version:" && \
|
echo "Phantom JS version:" && \
|
||||||
phantomjs --version ; \
|
phantomjs --version ; \
|
||||||
fi && \
|
fi && \
|
||||||
# Install ytdl-sub, ensure it is installed properly
|
# Install ytdl-sub, ensure it is installed properly
|
||||||
pip install --no-cache-dir --break-system-packages ytdl-sub.whl && \
|
pip install --no-cache-dir --break-system-packages ytdl_sub-*.whl && \
|
||||||
ytdl-sub -h && \
|
ytdl-sub -h && \
|
||||||
# Delete unneeded packages after install
|
# Delete unneeded packages after install
|
||||||
rm ytdl-sub.whl && \
|
rm ytdl_sub-*.whl && \
|
||||||
apt-get remove -y \
|
apt-get remove -y \
|
||||||
g++ \
|
g++ \
|
||||||
make \
|
make \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue