mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
docker: fix copying .gitconfig for proxy setup
The home directory path in the commented line here had not been updated when we switched to running the app as a normal user ("layers"), so do that now. Additionally we need to copy the file *after* we create the user, otherwise the home directory will be created by the COPY operation first and will thus end up being owned by root which we don't want. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
b35591d882
commit
8dc728bf62
12
Dockerfile
12
Dockerfile
|
@ -54,16 +54,16 @@ COPY docker/refreshlayers.sh /opt/refreshlayers.sh
|
|||
COPY docker/updatelayers.sh /opt/updatelayers.sh
|
||||
COPY docker/migrate.sh /opt/migrate.sh
|
||||
|
||||
## Uncomment to add a .gitconfig file within container
|
||||
#COPY docker/.gitconfig /root/.gitconfig
|
||||
## Uncomment to add a proxy script within container, if you choose to
|
||||
## do so, you will also have to edit .gitconfig appropriately
|
||||
#COPY docker/git-proxy /opt/bin/git-proxy
|
||||
|
||||
RUN mkdir /opt/workdir \
|
||||
&& adduser --system --uid=500 layers \
|
||||
&& chown -R layers /opt
|
||||
USER layers
|
||||
|
||||
## Uncomment to add a .gitconfig file within container
|
||||
#COPY docker/.gitconfig /home/layers/.gitconfig
|
||||
## Uncomment to add a proxy script within container, if you choose to
|
||||
## do so, you will also have to edit .gitconfig appropriately
|
||||
#COPY docker/git-proxy /opt/bin/git-proxy
|
||||
|
||||
# Start Gunicorn
|
||||
CMD ["/usr/local/bin/gunicorn", "wsgi:application", "--workers=4", "--bind=:5000", "--log-level=debug", "--chdir=/opt/layerindex"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user