1
0
mirror of https://github.com/kylemanna/docker-aosp synced 2025-06-07 07:56:25 +00:00

5 Commits

Author SHA1 Message Date
Robert O'Connor
3a961ec2a1
CCache doesn't seem to be working -- add this in the entrypoint 2017-07-15 19:14:46 -04:00
Kyle Manna
c2764be332 entrypoint: Preserve ENV variables
A few ENV variables are set in the Docker file, most notably those
related to ccache.  The move to a docker entrypoint script  called
sudo to switch to the AOSP user and reset the ENV varibles.

Preserve these variables so that things set in the Dockerfile are
inherited by the environment as expected.
2016-10-13 14:53:41 -07:00
Kyle Manna
b0aba84e4f utils: Fix harmless entrypoint msg typo
* Oops.
2016-10-12 12:10:32 -07:00
Jean-Christophe Fillion-Robin
a5daaab9ae docker_entrypoint: Default to 'bash' if no arguments are provided 2016-04-20 13:38:00 -04:00
Jean-Christophe Fillion-Robin
91ae4a8cdc utils/aosp: Update script and Dockerfile to work with any host user uid/gid
This commit introduces the "docker_entrypoint" script that will create
a user with uid/gid matching given `USER_ID` and `GROUP_ID` (or default to
`1000` if not provided).

Fixes #9

This approach works around missing docker feature discussed in
docker/docker#7198 and allow to have executable in the docker container
manipulating files in the shared volume owned by the `USER_ID:GROUP_ID`

The utility script `aosp` has also been updated to automatically
set `USER_ID` and `GROUP_ID` to the value matching the current user
by invoking "docker run" with

```
-e USER_ID=$(id -u) -e GROUP_ID=$(id -g)
```

Finally, the output has also been updated to be more verbose. For example:

```
$ AOSP_VOL=/home/jcfr/Projects/aosp-root/ aosp id
aosp: Checking if /home/jcfr/Projects/aosp-root/aosp exists
aosp: Checking if /home/jcfr/Projects/aosp-root/aosp exists - ok
aosp: Checking if /home/jcfr/Projects/aosp-root/ccache exists
aosp: Checking if /home/jcfr/Projects/aosp-root/ccache exists - ok

docker_entrypoint: Creating user UID/GID [1000/1000]
docker_entrypoint: Creating user UID/GID [1000/1000] - done
docker_entrypoint: Copying .gitconfig and .ssh/config to new user home
docker_entrypoint: Copying .gitconfig and .ssh/config to new user home - done
docker_entrypoint: Creating /tmp/ccache and /asop directory
docker_entrypoint: Creating /tmp/ccache and /asop directory - done

uid=1000(aosp) gid=1000(aosp) groups=1000(aosp)
```
2016-04-20 13:08:40 -04:00