This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Docker can't pass newlines to containers if there are \n in variables in | |
# --env-file files. This tool creates a $1.exported file with newlines that | |
# can be sourced before running your container and a $1.vars for you to pass | |
# to --env-files so docker passes those variables to the container. | |
# Usage: | |
# dockerize-env .env | |
# This creates: .env.vars and .env.exported |