Skip to content

Allow arbitrary --user values - #54

Merged
yosifkit merged 2 commits into
TryGhost:masterfrom
infosiftr:any-user
Dec 13, 2016
Merged

Allow arbitrary --user values#54
yosifkit merged 2 commits into
TryGhost:masterfrom
infosiftr:any-user

Conversation

@tianon

Copy link
Copy Markdown
Contributor

Closes#53 (carried)

This is implemented in the same way we've supported arbitrary values for docker run --user in many other images.

See also docker-library/rabbitmq#60, docker-library/cassandra#48, docker-library/mongo#81, redis/docker-library-redis#48, docker-library/mysql#161, and MariaDB/mariadb-docker#59, docker-library/percona#21.

@tianon

Copy link
Copy Markdown
ContributorAuthor
$ docker run -it --rm --user "$RANDOM:$RANDOM" --name ghost c0704a28c3d5npm info it worked if it ends with oknpm info using npm@2.15.11npm info using node@v4.7.0npm info prestart ghost@0.11.3npm info start ghost@0.11.3
> ghost@0.11.3 start /usr/src/ghost
> node indexWARNING: Ghost is attempting to use a direct method to send email. It is recommended that you explicitly configure an email service.Help and documentation can be found at http://support.ghost.org/mail.Migrations: Creating tables...Migrations: Creating table: postsMigrations: Creating table: usersMigrations: Creating table: rolesMigrations: Creating table: roles_usersMigrations: Creating table: permissionsMigrations: Creating table: permissions_usersMigrations: Creating table: permissions_rolesMigrations: Creating table: permissions_appsMigrations: Creating table: settingsMigrations: Creating table: tagsMigrations: Creating table: posts_tagsMigrations: Creating table: appsMigrations: Creating table: app_settingsMigrations: Creating table: app_fieldsMigrations: Creating table: clientsMigrations: Creating table: client_trusted_domainsMigrations: Creating table: accesstokensMigrations: Creating table: refreshtokensMigrations: Creating table: subscribersMigrations: Running fixture populationsMigrations: Creating ownerGhost is running in development... Listening on 0.0.0.0:2368 Url configured as: http://localhost:2368 Ctrl+C to shut down
$ docker top ghostUID PID PPID C STIME TTY TIME CMD27628 25665 25650 3 15:10 pts/8 00:00:00 npm27628 25902 25665 0 15:10 pts/8 00:00:00 sh -c node index27628 25903 25902 23 15:10 pts/8 00:00:04 node index

@tianon

Copy link
Copy Markdown
ContributorAuthor

Ok, this is weird:

$ docker run -it --rm --name ghost c0704a28c3d5ln: failed to create symbolic link '/usr/src/ghost/config.js': Permission denied

(running it as root, thus getting the gosu behavior rather than simply running as a different user)

Not sure yet why that'd cause any difference at all.

@ghost

ghost commented Dec 12, 2016

Copy link
Copy Markdown

May I suggest an update of the documentation to reflect this possibility?
And how do we set the '--user' when using docker-compose?

@yosifkit

Copy link
Copy Markdown
Contributor

docker-compose would just be user: 1000 or user: 999:50, so it uses the same single string as --user.

@tianon

Copy link
Copy Markdown
ContributorAuthor

Ok, this is updated now. 👍

(Creating the symlink at build-time instead of run-time.)

@yosifkit
yosifkit merged commit 46432ab into TryGhost:masterDec 13, 2016
@yosifkit
yosifkit deleted the any-user branch December 13, 2016 18:59
tianon added a commit to infosiftr/stackbrew that referenced this pull request Dec 13, 2016
- `celery`: 4.0.1
- `docker`: 1.12.4
- `elasticsearch`: add Alpine variants (docker-library/elasticsearch#149)
- `ghost`: allow arbitrary `--user` values (TryGhost/docker-library-ghost#54)
- `haproxy`: 1.7.1
- `java`: debian 9~b148-1
- `mariadb`: add explicit `--socket` (MariaDB/mariadb-docker#92)
- `mysql`: 5.7.17-1debian8, 5.6.35-1debian8, 5.5.54
- `openjdk`: debian 9~b148-1
- `percona`: add explicit `--socket` (docker-library/percona#37)
- `php`: move `CFLAGS` (and friends) to `PHP_CFLAGS`, add `-pie` (docker-library/php#352)
- `postgres`: 9.6.1-2.pgdg80+1, use `pgsql -f ...` instead of `pgsql < ...` for relative includes (docker-library/postgres#234)
- `rocket.chat`: 0.48.1
- `tomcat`: 8.5.9, 9.0.0.M15
- `wordpress`: add `fpm-alpine` variant (docker-library/wordpress#190)
@tianontianon mentioned this pull request Sep 26, 2017
lag-linaro pushed a commit to lag-linaro/fluentd-docker-image that referenced this pull request Nov 16, 2018
If permissions problems exist, they should be overcome properly.
For examples see:
LINK: docker-library/rabbitmq#60
LINK: docker-library/cassandra#48
LINK: docker-library/mongo#81
LINK: redis/docker-library-redis#48
LINK: docker-library/mysql#161
LINK: MariaDB/mariadb-docker#59
LINK: docker-library/percona#21
LINK: TryGhost/docker-library-ghost#54
LINK: docker-library/postgres#253
As suggested by @tianon
LINK: docker-library/official-images#3724 (comment)
This is part of an effort to make FluentD part of Docker's Official Images.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
lag-linaro pushed a commit to lag-linaro/fluentd-docker-image that referenced this pull request Nov 19, 2018
If permissions problems exist, they should be overcome properly.
For examples see:
LINK: docker-library/rabbitmq#60
LINK: docker-library/cassandra#48
LINK: docker-library/mongo#81
LINK: redis/docker-library-redis#48
LINK: docker-library/mysql#161
LINK: MariaDB/mariadb-docker#59
LINK: docker-library/percona#21
LINK: TryGhost/docker-library-ghost#54
LINK: docker-library/postgres#253
As suggested by @tianon
LINK: docker-library/official-images#3724 (comment)
This is part of an effort to make FluentD part of Docker's Official Images.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
lag-linaro pushed a commit to lag-linaro/fluentd-docker-image that referenced this pull request Nov 23, 2018
If permissions problems exist, they should be overcome properly.
For examples see:
LINK: docker-library/rabbitmq#60
LINK: docker-library/cassandra#48
LINK: docker-library/mongo#81
LINK: redis/docker-library-redis#48
LINK: docker-library/mysql#161
LINK: MariaDB/mariadb-docker#59
LINK: docker-library/percona#21
LINK: TryGhost/docker-library-ghost#54
LINK: docker-library/postgres#253
As suggested by @tianon
LINK: docker-library/official-images#3724 (comment)
This is part of an effort to make FluentD part of Docker's Official Images.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
lag-linaro pushed a commit to lag-linaro/fluentd-docker-image that referenced this pull request Nov 30, 2018
If permissions problems exist, they should be overcome properly.
For examples see:
LINK: docker-library/rabbitmq#60
LINK: docker-library/cassandra#48
LINK: docker-library/mongo#81
LINK: redis/docker-library-redis#48
LINK: docker-library/mysql#161
LINK: MariaDB/mariadb-docker#59
LINK: docker-library/percona#21
LINK: TryGhost/docker-library-ghost#54
LINK: docker-library/postgres#253
As suggested by @tianon
LINK: docker-library/official-images#3724 (comment)
This is part of an effort to make FluentD part of Docker's Official Images.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
lag-linaro pushed a commit to lag-linaro/fluentd-docker-image that referenced this pull request Dec 19, 2018
If permissions problems exist, they should be overcome properly.
For examples see:
LINK: docker-library/rabbitmq#60
LINK: docker-library/cassandra#48
LINK: docker-library/mongo#81
LINK: redis/docker-library-redis#48
LINK: docker-library/mysql#161
LINK: MariaDB/mariadb-docker#59
LINK: docker-library/percona#21
LINK: TryGhost/docker-library-ghost#54
LINK: docker-library/postgres#253
As suggested by @tianon
LINK: docker-library/official-images#3724 (comment)
This is part of an effort to make FluentD part of Docker's Official Images.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Sign up for freeto 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

@tianon@yosifkit@toanhoang