Skip to content

Commit

Permalink
Updated dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ElSiipo committed Oct 7, 2019
1 parent 13df33c commit 2a017bd
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Dockerfile.CompressImages
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ RUN cd /src/CompressImagesFunction && cp bin/Release/netstandard2.0/bin/runtimes
FROM mcr.microsoft.com/azure-functions/dotnet:2.0

RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \
curl libcurl3
curl libcurl3 autoconf automake libtool nasm make wget pkg-config

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g svgo@^1.3.0
RUN npm install -g mozjpeg

# Add support for mozjpeg
RUN cd /tmp && wget https://github.com/mozilla/mozjpeg/archive/v3.3.1.tar.gz
RUN cd /tmp && tar -xzf v3.3.1.tar.gz
RUN cd /tmp/mozjpeg-3.3.1 && autoreconf -fiv
RUN mkdir /tmp/mozjpeg-3.3.1/build
RUN cd /tmp/mozjpeg-3.3.1/build && sh ../configure && make install

RUN ln -s /opt/mozjpeg/bin/jpegtran /usr/local/bin/mozjpegtran
RUN ln -s /opt/mozjpeg/bin/cjpeg /usr/local/bin/mozcjpeg

ENV AzureWebJobsScriptRoot=/home/site/wwwroot
COPY --from=dotnet ["/home/site/wwwroot", "/home/site/wwwroot"]

0 comments on commit 2a017bd

Please sign in to comment.