From 61e9bf70dc7d4b0ce9b6dfe8780609b87050a5a2 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 6 Feb 2020 13:30:21 -0300 Subject: [PATCH] =?UTF-8?q?agregar=20optimizadores=20de=20im=C3=A1genes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit es una herramienta secreta que nos va a servir luego --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c340cbd5..634c264a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ # el mismo repositorio de trabajo. Cuando tengamos CI/CD algunas cosas # como el tarball van a tener que cambiar porque ya vamos a haber hecho # un clone/pull limpio. +FROM sutty/oxipng:latest as oxipng FROM alpine:3.11 as build MAINTAINER "f " @@ -67,10 +68,14 @@ RUN rm -rf ./node_modules ./tmp/cache ./.git FROM sutty/monit:latest ENV RAILS_ENV production +# Instalar oxipng +COPY --from=oxipng --chown=root:root /root/.cargo/bin/oxipng /usr/bin/oxipng +RUN chmod 755 /usr/bin/oxipng + # Instalar las dependencias, separamos la librería de base de datos para # poder reutilizar este primer paso desde otros contenedores RUN apk add --no-cache libxslt libxml2 tzdata ruby ruby-bundler ruby-json ruby-bigdecimal ruby-rake -RUN apk add --no-cache postgresql-libs libssh2 file rsync git +RUN apk add --no-cache postgresql-libs libssh2 file rsync git jpegoptim vips # Chequear que la versión de ruby sea la correcta RUN test "2.6.5" = `ruby -e 'puts RUBY_VERSION'`