Skip to content

DMCPartners/docker-mozjpeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

docker-mozjpeg

Usage

Use multi-stage builds based on this image saved my life.

Example:

FROM dmcpartners/docker-mozjpeg as builder

FROM node:10-alpine
WORKDIR /usr/src/app

COPY package*.json ./
RUN npm install --only=production

COPY --from=builder /usr/local /usr/local

COPY . .

CMD [ "npm", "start" ]

Note: all binary files of mozjpeg will be located in /usr/local/bin, e.g. /usr/local/bin/jpegtran.