mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 10:09:45 +00:00
Switch to prebuilt WABT and wasm-pack
Significantly speeds up `npm run build:image` commands (as they don't need to compile anything anymore) and slightly reduces size of Docker images: - `squoosh-rotate`: 1.87GB -> 1.84GB - `squoosh-resize`: 2.02GB -> 1.85GB - `squoosh-hqx`: 2.06GB -> 1.9GB
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
FROM ubuntu
|
||||
RUN apt-get update && \
|
||||
apt-get install -qqy git build-essential cmake python2.7
|
||||
RUN git clone --recursive https://github.com/WebAssembly/wabt /usr/src/wabt
|
||||
RUN mkdir -p /usr/src/wabt/build
|
||||
WORKDIR /usr/src/wabt/build
|
||||
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/wabt && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
FROM rust
|
||||
RUN rustup target add wasm32-unknown-unknown
|
||||
|
||||
COPY --from=0 /opt/wabt /opt/wabt
|
||||
ENV PATH="/opt/wabt/bin:${PATH}"
|
||||
RUN mkdir /opt/wabt && \
|
||||
curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.11/wabt-1.0.11-linux.tar.gz | tar -xzf - -C /opt/wabt --strip 1
|
||||
|
||||
ENV PATH="/opt/wabt:${PATH}"
|
||||
WORKDIR /src
|
||||
|
||||
Reference in New Issue
Block a user