Skip to content

Simplify docker-entrypoint.sh append one line to EOF - #270

Merged
yosifkit merged 1 commit into
docker-library:masterfrom
pahaz:patch-1
Apr 6, 2017
Merged

yosifkit merged 1 commit into
docker-library:masterfrom
pahaz:patch-1

Conversation

@pahaz

@pahaz pahaz commented Mar 23, 2017

Copy link
Copy Markdown
Contributor

Sorry, but not all developers know this extra bash syntax.
But please keep it simple for other developers.

If readability is not so important for you just close this pull.
Thanks

Comment thread 9.6/docker-entrypoint.sh Outdated
{ echo; echo "host all all all $authMethod"; } | tee -a "$PGDATA/pg_hba.conf" > /dev/null

echo "" >> $PGDATA/pg_hba.conf
echo "host all all all $authMethod" >> $PGDATA/pg_hba.conf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the | tee ... was a remnant from when we actually had to do | gosu postgres tee ....

IMO, we should instead add some whitespace and use >> now, ala:

	{
		echo
		echo "host all all all $authMethod"
	} >> "$PGDATA/pg_hba.conf"

@tianon
tianon requested a review from yosifkit April 6, 2017 21:41
@yosifkit
yosifkit merged commit 3b9d57d into docker-library:master Apr 6, 2017
tianon added a commit to infosiftr/stackbrew that referenced this pull request Apr 7, 2017
- `drupal`: 8.3.0 (docker-library/drupal#78), remove 8.2 (docker-library/drupal#80)
- `ghost`: add `alpine` variant (TryGhost/docker-library-ghost#55)
- `mongo`: more edge cases (docker-library/mongo#167, docker-library/mongo#169)
- `postgres`: adjust append (docker-library/postgres#270)
- `rabbitmq`: add `vm_memory_high_watermark` support based on cgroup limits (docker-library/rabbitmq#105)
- `rocket.chat`: 0.55.0-rc.1
- `wordpress`: add `wp-cli` variant (docker-library/wordpress#198)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants