I need to run a bash script containing SQL, so I use a script to add custom configurations to the Postgres Docker container according to the docs here:
https://github.com/docker-library/docs/tree/master/postgres#how-to-extend-this-image
But I do not know what it means EOSQL. Here is an example of my script taken from the docs above:
EOSQL
#!/bin/bash set -e psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL CREATE USER docker; CREATE DATABASE docker; GRANT ALL PRIVILEGES ON DATABASE docker TO docker; CREATE EXTENSION $MY_EXTENSION; EOSQL
So what is EOSQL? I can not find much information about this command or keyword.
EOSQL - Bash Here Document. , . .
:
#!/usr/bin/env bash cat <<-EOF $MY_EXTENSION EOF
$ MY_EXTENSION=something ./test.sh something
Docker ENV MY_EXTENSION=something Dockerfile docker run -e MY_EXTENSION=something <image> , .
ENV MY_EXTENSION=something
Dockerfile
docker run -e MY_EXTENSION=something <image>
Source: https://habr.com/ru/post/1650384/More articles:Required property, but Nullable, Entity Framework via First code - c #Django error: assertInHTML ('hello', ' hello) - pythonAny reasons why AVQueuePlayer sometimes worked or sometimes not? - iosPython currying with any number of variables - pythonWhy doesn't the Xcode crash report show the source code? - iosIs Owin / Katana supposed to replace the Web API? - c #best way to use context in fragment - androidUse custom GStreamer plugin in Android - androidSetting the time zone Godaddy Hosting Cron - cronHow to change request body using chrome extension - javascriptAll Articles