First big articles reformatting now that I properly understand hugo
This commit is contained in:
parent
5e6844592a
commit
1a4981a826
40 changed files with 184 additions and 173 deletions
|
@ -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"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue