Run as user inside Container
This commit is contained in:
parent
c7c4025b68
commit
7691c57331
1 changed files with 3 additions and 4 deletions
|
@ -26,8 +26,7 @@ RUN echo ${NANO_NETWORK} >/etc/nano-network
|
|||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN groupadd --gid 1000 nanocurrency && \
|
||||
useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurrency
|
||||
RUN useradd -d /nano -s /sbin/nologin nanocurrency
|
||||
|
||||
COPY --from=builder /tmp/src/build/nano_node /usr/bin
|
||||
COPY --from=builder /tmp/src/build/nano_rpc /usr/bin
|
||||
|
@ -40,8 +39,8 @@ RUN chmod +x /usr/bin/entry.sh
|
|||
RUN ln -s /usr/bin/nano_node /usr/bin/rai_node
|
||||
RUN ldconfig
|
||||
|
||||
WORKDIR /root
|
||||
USER root
|
||||
WORKDIR /nano
|
||||
USER nanocurrency
|
||||
|
||||
ENV PATH="${PATH}:/usr/bin"
|
||||
ENTRYPOINT ["/usr/bin/entry.sh"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue