Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ENV PATH $PATH:/usr/lib/postgresql/$PG_MAJOR/bin

ENV PG_VERSION {{ .[env.variant].version }}

RUN set -ex; \
RUN set -eux; \
\
# see note below about "*.pyc" files
export PYTHONDONTWRITEBYTECODE=1; \
Expand Down Expand Up @@ -160,7 +160,7 @@ RUN set -ex; \
\
rm -rf /var/lib/apt/lists/*; \
\
if [ -n "$tempDir" ]; then \
if [ -v "tempDir" ]; then \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the sentiment, but I'd prefer to keep -n and handle -u with ${...:-} instead:

Suggested change
if [ -v "tempDir" ]; then \
if [ -n "${tempDir:-}" ]; then \

(This also needs ./apply-templates.sh run so that this change applies outward to all our Dockerfiles)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx. I like your solution.

# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
apt-get purge -y --auto-remove; \
rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \
Expand Down