-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build multi-platform without Python2
- Loading branch information
1 parent
33d0de3
commit cae4547
Showing
2 changed files
with
20 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
FROM sitespeedio/node:ubuntu-20.04-nodejs-12.16.2 | ||
FROM sitespeedio/node:ubuntu-20.04-nodejs-14.16.0 | ||
|
||
ARG TARGETPLATFORM | ||
|
||
# Lets install all dependencies for VisualMetrics | ||
RUN buildDeps='wget ca-certificates' && \ | ||
RUN export BUILD=$(if [ "$TARGETPLATFORM" = "linux/amd64" ] ; then echo "amd64"; else echo "arm64"; fi) \ | ||
buildDeps='wget ca-certificates' && \ | ||
apt-get update -y && apt-get install -y \ | ||
imagemagick \ | ||
libjpeg-dev \ | ||
python2 \ | ||
python2-dev \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python-is-python3 \ | ||
xz-utils \ | ||
$buildDeps \ | ||
--no-install-recommends --force-yes && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | ||
wget https://bootstrap.pypa.io/get-pip.py && \ | ||
python2 get-pip.py && \ | ||
python2 -m pip install --upgrade pip && \ | ||
python2 -m pip install --upgrade setuptools && \ | ||
python2 -m pip install pyssim && \ | ||
update-alternatives --install /usr/bin/python python /usr/bin/python2 1 && \ | ||
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz && \ | ||
tar --strip-components 1 -C /usr/bin -xf ffmpeg-release-amd64-static.tar.xz --wildcards */ffmpeg && \ | ||
rm ffmpeg-release-amd64-static.tar.xz && \ | ||
python -m pip install --upgrade pip && \ | ||
python -m pip install --upgrade setuptools && \ | ||
python -m pip install pyssim pyssim Pillow image && \ | ||
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-$BUILD-static.tar.xz && \ | ||
tar --strip-components 1 -C /usr/bin -xf ffmpeg-release-$BUILD-static.tar.xz --wildcards */ffmpeg && \ | ||
rm ffmpeg-release-$BUILD-static.tar.xz && \ | ||
apt-get purge -y --auto-remove $buildDeps |
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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# Docker VisualMetrics dependencies | ||
Adds the dependencies needed by [VisualMetrics](https://github.com/WPO-Foundation/visualmetrics) to sitespeed.io [base container](https://github.com/sitespeedio/docker-node). | ||
|
||
|
||
``` | ||
docker buildx build --push --platform linux/arm64,linux/amd64 -t sitespeedio/visualmetrics-deps:ffmpeg-4.2.2-imagemagick-6.9.10-23-p2-c . | ||
``` |