From fdffea6f37382b40180a67308e073dee6d644d79 Mon Sep 17 00:00:00 2001 From: m2sh Date: Sun, 31 Jul 2016 22:51:08 +0430 Subject: [PATCH] make beanstalkd-console lighter with using php:7-alpine base image --- beanstalkd-console/Dockerfile | 7 ++++--- beanstalkd-console/install.sh | 10 +++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/beanstalkd-console/Dockerfile b/beanstalkd-console/Dockerfile index 4c9c284..b3041f1 100644 --- a/beanstalkd-console/Dockerfile +++ b/beanstalkd-console/Dockerfile @@ -1,8 +1,9 @@ -FROM php:5.6 +FROM php:7-alpine MAINTAINER Johannes Schickling "schickling.j@gmail.com" ADD install.sh install.sh -RUN chmod +x install.sh && ./install.sh && rm install.sh +RUN chmod +x install.sh +RUN ./install.sh && rm install.sh EXPOSE 2080 -CMD bash -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public' +CMD sh -c 'BEANSTALK_SERVERS=$BEANSTALKD_PORT_11300_TCP_ADDR:11300 php -S 0.0.0.0:2080 -t /source/public' diff --git a/beanstalkd-console/install.sh b/beanstalkd-console/install.sh index 8795ad6..bf96206 100644 --- a/beanstalkd-console/install.sh +++ b/beanstalkd-console/install.sh @@ -1,15 +1,11 @@ -#! /bin/bash +#! /bin/sh # exit if a command fails set -e -# install curl (needed to install rust) -apt-get update && apt-get install -y curl - # download curl -sL https://github.com/ptrofimov/beanstalk_console/archive/master.tar.gz | tar xvz -C /tmp mv /tmp/beanstalk_console-master /source -# cleanup package manager -apt-get remove --purge -y curl && apt-get autoclean && apt-get clean -rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# remove tmp files +rm -rf /tmp/*