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

update deveopment environment #4782

Merged
merged 1 commit into from
Aug 16, 2021
Merged

Conversation

hgy59
Copy link
Contributor

@hgy59 hgy59 commented Aug 15, 2021

Motivation: The development environment needs sponge command to use jq for in place modification.
Linked issues: required by #4781, #4693

Checklist

  • Build rule all-supported completed successfully
  • Package upgrade completed successfully
  • New installation of package completed successfully

Remarks

  • add moreutils for sponge command
  • add sudo to use docker image as regular user
    This is a precondition to install native packages from repository as proposed in Install native packages #4693.

- add moreutils for sponge command
- add sudo to use docker image as regular user
@hgy59 hgy59 requested a review from publicarray August 15, 2021 13:31
@hgy59 hgy59 mentioned this pull request Aug 15, 2021
3 tasks
@publicarray
Copy link
Member

LGTM but I still don't understand what the new user 'user' is for?

@hgy59
Copy link
Contributor Author

hgy59 commented Aug 15, 2021

LGTM but I still don't understand what the new user 'user' is for?

I always run the spksrc container with docker run -it .... --user $(id -u):$(id -g) ... synocommunity/spksrc:latest

So all file modifications in the mounted /spksrc folder in the container are done with my host user, and therefore I have full access without root on the host.
Without the user user inside the container the user is I have no name!.
I know that this works only due when the host user id is 1000 (the same as the user has inside the container).

Finally we need a dedicated user in the container that works with sudo without password if one want to avoid using root.

This is for a future update to eliminate to build native binaries (cmake, go, etc.) and to use apt-get install to install such prerequisites instead.

@publicarray
Copy link
Member

publicarray commented Aug 15, 2021

@hgy59 Thanks 👍

Rather than --user $(id -u):$(id -g) you could add the USER user or USER 1000:1000 to the image, so this is done by default? Maybe add a group for the id 1000 as well?

@hgy59
Copy link
Contributor Author

hgy59 commented Aug 16, 2021

Maybe add a group for the id 1000 as well?

The group 1000 (user) is created by default for the user user.

$ cat /etc/passwd | grep user
user:x:1000:1000:,,,:/home/user:/bin/bash

@hgy59 hgy59 merged commit cd645e2 into SynoCommunity:master Aug 16, 2021
@publicarray
Copy link
Member

Is it possible to get the image on docker hub updated?

@hgy59
Copy link
Contributor Author

hgy59 commented Aug 17, 2021

Is it possible to get the image on docker hub updated?

@ymartin59 how to trigger an update of the docker hub image?

@publicarray
Copy link
Member

@hgy59 hgy59 mentioned this pull request Aug 22, 2021
3 tasks
@hgy59 hgy59 deleted the update_dockerfile branch August 29, 2021 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants