Skip to content

Commit c2c24c1

Browse files
author
Matthew Fisher
committed
fix(Dockerfile): remove uses of semicolons
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.
1 parent 0801767 commit c2c24c1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN adduser --system \
1515
--group \
1616
postgres
1717

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

0 commit comments

Comments
 (0)