Bench init raise error

This is my Dockerfile:

FROM ubuntu:20.04

Install dependencies

RUN apt update
&& apt install -y redis-server mariadb-server libcups2-dev git python3.8 python3-pip curl
&& curl -sL https://deb.nodesource.com/setup_14.x | bash -
&& apt install -y nodejs
&& npm install -g yarn

Set up pip cache

ENV PIP_CACHE_DIR=/root/.cache/pip

Set up yarn cache

ENV YARN_CACHE_FOLDER=/root/.yarn-cache

Set the working directory

WORKDIR /

Copy project files

COPY . .

Install project dependencies

RUN pip3 install frappe-bench bandit

RUN git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-13 --depth 1

RUN bench init --skip-assets --frappe-path ~/frappe --python /usr/bin/python3.8 frappe-bench

Run shell script

RUN chmod +x setup.sh

RUN ./setup.sh

When Jenkins server run with Dockerfile, it raise error in line bench init? How to fix it?

[6/9] RUN bench init --skip-assets --frappe-path ~/frappe --python /usr/bin/python3.8 frappe-bench:
#10 0.895 WARN: You should not run this command as root


Dockerfile:27

25 | RUN git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-13 --depth 1
26 |
27 | >>> RUN bench init --skip-assets --frappe-path ~/frappe --python /usr/bin/python3.8 frappe-bench
28 |
29 | # Run shell script

ERROR: failed to solve: process “/bin/sh -c bench init --skip-assets --frappe-path ~/frappe --python /usr/bin/python3.8 frappe-bench” did not complete successfully: exit code: 1