Skip to content

Commit

Permalink
Remove contrib/dockerenv
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1nksm committed Aug 8, 2024
1 parent 2183e03 commit 319edc5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 50 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,16 @@ This is similar to `export`, `env` and `printenv` commands, but quoting correctl
shdotenv export [-n | -p] [NAME]...
```

### Additional CLI utility
## How to work with docker

#### contrib/dockerenv

The `docker` command has the `--env-file` option, but it only supports setting simple values.
The `docker` command has the `--env-file` option, but it only supports setting simple values without newlines.

- [docker cannot pass newlines from variables in --env-file files](https://github.com/moby/moby/issues/12997)

This tool makes the files read by `--env-file` compatible with the `.env` format, and supports variable expansion and newlines.

Example: (Use `dockerenv` instead of `docker`)
shdotenv provides a simple solution to this problem.

```sh
dockerenv run --env-file .env -it debian
shdotenv docker run $(shdotenv -n | sed s/^/-e/) debian sh -c export
```

## .env file syntax
Expand Down
42 changes: 0 additions & 42 deletions contrib/dockerenv

This file was deleted.

0 comments on commit 319edc5

Please sign in to comment.