diff options
author | zhaoyh6 <zhaoyh6@asiainfo.com> | 2021-10-26 11:25:03 +0800 |
---|---|---|
committer | zhaoyh6 <zhaoyh6@asiainfo.com> | 2021-10-26 11:25:26 +0800 |
commit | d0476be3c0aff4bd0b7dee589050248a817549c0 (patch) | |
tree | f8660568ba0343999387801d5385e2d7045cf2b9 /standalone/src/main/assembly/dockerfile | |
parent | 698bd185b568e159999649b8270166feb47fcb43 (diff) |
feat:Modify the login user and working directory of the image
Issue-ID: USECASEUI-605
Signed-off-by: zhaoyh6 <zhaoyh6@asiainfo.com>
Change-Id: Ie69cb8683bc5976545b8ec01dd314812e2d634d8
Diffstat (limited to 'standalone/src/main/assembly/dockerfile')
-rw-r--r-- | standalone/src/main/assembly/dockerfile | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/standalone/src/main/assembly/dockerfile b/standalone/src/main/assembly/dockerfile index 970eafd..4203e20 100644 --- a/standalone/src/main/assembly/dockerfile +++ b/standalone/src/main/assembly/dockerfile @@ -1,6 +1,12 @@ FROM tensorflow/serving:latest -WORKDIR /home/run/ +RUN mkdir -p /home/uuihome/uui + +WORKDIR /home/uuihome/uui + +RUN groupadd uui -g 1000 + +RUN useradd -u 1000 -d /home/uuihome/uui -g uui -s /bin/bash uui RUN DEBIAN_FRONTEND=noninteractive apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get install wget -y @@ -10,12 +16,12 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install python3-pip python3-dev build RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -s /usr/bin/pip3 /usr/bin/pip -COPY requirements /home/run/requirements +COPY requirements /home/uuihome/uui/requirements RUN DEBIAN_FRONTEND=noninteractive pip install -r requirements +COPY scripts /home/uuihome/uui/scripts +COPY run.sh /home/uuihome/uui/run.sh -COPY scripts /home/run/scripts - -COPY run.sh /home/run/run.sh - -ENTRYPOINT /home/run/run.sh +RUN chown -R uui:uui /home/uuihome/uui +USER uui +ENTRYPOINT /home/uuihome/uui/run.sh
\ No newline at end of file |