Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow arbitrary --user values #54

Merged
merged 2 commits into from
Dec 13, 2016
Merged

Conversation

tianon
Copy link
Member

@tianon tianon commented Dec 12, 2016

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
Member Author

tianon commented Dec 12, 2016

$ docker run -it --rm --user "$RANDOM:$RANDOM" --name ghost c0704a28c3d5
npm info it worked if it ends with ok
npm info using npm@2.15.11
npm info using node@v4.7.0
npm info prestart ghost@0.11.3
npm info start ghost@0.11.3

> ghost@0.11.3 start /usr/src/ghost
> node index

WARNING: 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: posts
Migrations: Creating table: users
Migrations: Creating table: roles
Migrations: Creating table: roles_users
Migrations: Creating table: permissions
Migrations: Creating table: permissions_users
Migrations: Creating table: permissions_roles
Migrations: Creating table: permissions_apps
Migrations: Creating table: settings
Migrations: Creating table: tags
Migrations: Creating table: posts_tags
Migrations: Creating table: apps
Migrations: Creating table: app_settings
Migrations: Creating table: app_fields
Migrations: Creating table: clients
Migrations: Creating table: client_trusted_domains
Migrations: Creating table: accesstokens
Migrations: Creating table: refreshtokens
Migrations: Creating table: subscribers
Migrations: Running fixture populations
Migrations: Creating owner
Ghost is running in development... 
Listening on 0.0.0.0:2368 
Url configured as: http://localhost:2368 
Ctrl+C to shut down
$ docker top ghost
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
27628               25665               25650               3                   15:10               pts/8               00:00:00            npm
27628               25902               25665               0                   15:10               pts/8               00:00:00            sh -c node index
27628               25903               25902               23                  15:10               pts/8               00:00:04            node index

@tianon
Copy link
Member Author

tianon commented Dec 12, 2016

Ok, this is weird:

$ docker run -it --rm --name ghost c0704a28c3d5
ln: 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
Copy link

ghost commented Dec 12, 2016

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
Member

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

@tianon
Copy link
Member Author

tianon commented Dec 13, 2016

Ok, this is updated now. 👍

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

@yosifkit yosifkit merged commit 46432ab into docker-library:master Dec 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 (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)
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: 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: 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: 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: 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: 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 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