First big articles reformatting now that I properly understand hugo

This commit is contained in:
Julien Dessaux 2021-03-11 19:47:26 +01:00
parent 5e6844592a
commit 1a4981a826
40 changed files with 184 additions and 173 deletions

View file

@ -1,12 +1,19 @@
---
title: "Shell usage in dockerfile"
linkTitle: "Shell usage in dockerfile"
date: 2019-02-04
description: >
How to use a proper shell in a dockerfile
description: How to use a proper shell in a dockerfile
tags:
- docker
- linux
---
The default shell is `[“/bin/sh”, “-c”]`, which doesn't handle pipe fails when chaining commands. To process errors when using pipes use this :
## The problem
The default shell is `[“/bin/sh”, “-c”]`, which doesn't handle pipe fails when chaining commands.
## The fix
To process errors when using pipes use this :
{{< highlight sh >}}
SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"]