From: Erik Date: Thu, 9 Jun 2022 14:55:06 +0000 (+0900) Subject: Regular updates X-Git-Url: http://git.osdn.net/view?p=twpd%2Fmaster.git;a=commitdiff_plain;h=b384e9dbbbf142d02be169e99a6bd1bbabb96111 Regular updates --- diff --git a/composer.md b/composer.md index 79abc2d..e73c3a3 100644 --- a/composer.md +++ b/composer.md @@ -49,7 +49,7 @@ This command changes only the `composer.lock` file. | Command | Description | | --- | --- | -| `composer require vendor/package`. | Adds `package` from `vendor` to composer.json's `require` section and installs it | +| `composer require vendor/package` | Adds `package` from `vendor` to composer.json's `require` section and installs it | | --- | --- | | `composer require vendor/package --dev` | Adds `package` from `vendor` to composer.json's `require-dev` section and installs it. | diff --git a/dockerfile.md b/dockerfile.md index 62a0a94..83b02e8 100644 --- a/dockerfile.md +++ b/dockerfile.md @@ -47,6 +47,20 @@ ADD file.xyz /file.xyz COPY --chown=user:group host_file.xyz /path/container_file.xyz ``` +### Run commands in strict shell + +```docker +ENV my_var +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + +# With strict mode: +RUN false # fails build like using && +RUN echo "$myvar" # will throw error due to typo +RUN true | false # will bail out of pipe +``` + +Using `shell` will turn on strict mode for shell commands. + ### Onbuild ```docker