From 22176e277d6eb418a15bca5beef89d76d2ffb940 Mon Sep 17 00:00:00 2001 From: Peter Woo Date: Tue, 15 Aug 2017 15:40:59 -0700 Subject: [PATCH] Use node:7-alpine image in Dockerfile --- Dockerfile | 7 ++++++- entrypoint.sh | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffd98f7..d69f059 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,9 @@ -FROM node:7.5.0 +FROM node:7-alpine + +RUN apk --update --no-cache add \ + build-base file autoconf make gcc g++ python \ + alpine-sdk automake autoconf make nasm gcc g++ zlib zlib-dev \ + libpng libpng-dev libwebp libwebp-dev libjpeg-turbo libjpeg-turbo-dev COPY package.json /tmp/package.json RUN cd /tmp \ diff --git a/entrypoint.sh b/entrypoint.sh index 921644d..3a7c3cd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh -if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then +if [ "$(echo $NODE_ENV | tr '[:upper:]' '[:lower:]')" = "production" ]; then npm run build:prod git rev-parse HEAD >.build/revision fi