Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbc9ab7

Browse filesBrowse files
Docker shortcuts
+ update readme with steps on how to shorten docker command + Fix Typo related to URI help menu
1 parent c355ddb commit cbc9ab7
Copy full SHA for cbc9ab7

File tree

Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-2
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Use "mock [command] --help" for more information about a command.
114114

115115
provided `/usr/local/bin` is part of the $PATH environment variable.
116116

117-
### Via docker
117+
### Using Docker
118118
+ Pull the image & you are all set
119119
```
120120
docker pull ghcr.io/pivotal-gss/mock-data:latest
@@ -143,6 +143,12 @@ provided `/usr/local/bin` is part of the $PATH environment variable.
143143
```
144144
docker run -v /tmp/mock:/home/mock mock database -f -a host.docker.internal -u postgres -d demodb
145145
```
146+
+ **[Optional]** You can also make an alias of the above command, for eg.s alias with `.zshrc`
147+
```
148+
echo alias mock=\"docker run -it -v /tmp/mock:/home/mock ghcr.io/pivotal-gss/mock-data:latest\" >> ~/.zshrc
149+
source ~/.zshrc
150+
mock tables -t "public.gardens" --uri="postgres://pg_user:mypassword@myhost:5432/database_name?sslmode=disable"
151+
```
146152
147153
## Examples
148154

‎cmd.go

Copy file name to clipboardExpand all lines: cmd.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func init() {
222222
rootCmd.PersistentFlags().IntVarP(&cmdOptions.Port, "port", "p",
223223
viper.GetInt("PGPORT"), "Port number of the postgres database")
224224
rootCmd.PersistentFlags().StringVar(&cmdOptions.URI, "uri",
225-
"", "Postgres connection URI, eg. postgres://user:pass@host:=port/db?sslmode=disable")
225+
"", "Postgres connection URI, eg. postgres://user:pass@host:port/db?sslmode=disable")
226226
rootCmd.PersistentFlags().StringVarP(&cmdOptions.Hostname, "address", "a",
227227
viper.GetString("PGHOSTADDR"), "Hostname where the postgres database lives")
228228
rootCmd.PersistentFlags().StringVarP(&cmdOptions.Username, "username", "u",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.