Skip to content

Commit

Permalink
fix(Dockerfile): remove uses of semicolons
Browse files Browse the repository at this point in the history
In bash syntax, the semicolon allows the previous command to fail and still run the next command in
the chain. In this case we do not want that to occur as the gunzip/tar/gzip commands are all
tightly coupled together, so if one fails the entire chain should fail.
  • Loading branch information
Matthew Fisher committed Sep 29, 2016
1 parent 0801767 commit c2c24c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN adduser --system \
--group \
postgres

RUN buildDeps='gcc git libffi-dev libssl-dev python-dev python-pip python-wheel'; \
RUN buildDeps='gcc git libffi-dev libssl-dev python-dev python-pip python-wheel' && \
localedef -i en_US -c -f UTF-8 -A /etc/locale.alias en_US.UTF-8 && \
export DEBIAN_FRONTEND=noninteractive && \
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 && \
Expand Down Expand Up @@ -44,8 +44,10 @@ RUN buildDeps='gcc git libffi-dev libssl-dev python-dev python-pip python-wheel'
apt-get autoremove -y && \
apt-get clean -y && \
# package up license files if any by appending to existing tar
COPYRIGHT_TAR='/usr/share/copyrights.tar'; \
gunzip $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \
COPYRIGHT_TAR='/usr/share/copyrights.tar' && \
gunzip $COPYRIGHT_TAR.gz && \
tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright && \
gzip $COPYRIGHT_TAR && \
rm -rf \
/usr/share/doc \
/usr/share/man \
Expand Down

0 comments on commit c2c24c1

Please sign in to comment.