putting everything in 1 RUN command

This commit is contained in:
André Bauer 2017-07-23 12:10:59 +02:00
parent 329cfb6c83
commit 7adad799c5

View File

@ -21,7 +21,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.schema-version="1.2" \ org.label-schema.schema-version="1.2" \
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
# install dependencies & GOSU # install dependencies, GOSU & zammad
RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev" \ RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev" \
GOSU_DEPENDENCIES="ca-certificates wget" \ GOSU_DEPENDENCIES="ca-certificates wget" \
set -ex \ set -ex \
@ -33,10 +33,7 @@ RUN BUILD_DEPENDENCIES="git build-essential libffi-dev libpq5 libpq-dev" \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -rf "${GNUPGHOME}" /usr/local/bin/gosu.asc \ && rm -rf "${GNUPGHOME}" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \ && chmod +x /usr/local/bin/gosu \
&& gosu nobody true && gosu nobody true \
# install zammad
RUN set -ex \
&& useradd -M -d ${ZAMMAD_DIR} -s /bin/bash ${ZAMMAD_USER} \ && useradd -M -d ${ZAMMAD_DIR} -s /bin/bash ${ZAMMAD_USER} \
&& cd $(dirname ${ZAMMAD_DIR}) \ && cd $(dirname ${ZAMMAD_DIR}) \
&& git clone --depth 1 -b "${GIT_BRANCH}" "${GIT_URL}" \ && git clone --depth 1 -b "${GIT_BRANCH}" "${GIT_URL}" \