Last active
October 10, 2019 11:10
-
-
Save mikybars/222aa9e8d2f49c1502e8ffdbc6497251 to your computer and use it in GitHub Desktop.
Feed input to a Docker container
This file contains 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
$ docker container run -i db psql postgres -U postgres <<EOF | |
CREATE TABLE employee (id INTEGER PRIMARY KEY, name VARCHAR); | |
INSERT INTO employee VALUES (1, 'Miguel'); | |
INSERT INTO employee VALUES (2, 'Javier'); | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment