-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·38 lines (22 loc) · 1003 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:22.04
ENV GID=99
ENV UID=1000
RUN apt update && \
apt install -y sudo pkg-config cmake libtool autoconf python3-pip git && \
addgroup --gid $GID nonroot && \
adduser --uid $UID --gid $GID --disabled-password --gecos "" nonroot && \
echo 'nonroot ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
RUN apt install -y buildah skopeo slirp4netns
RUN echo "unqualified-search-registries=[\"docker.io\"]" >> /etc/containers/registries.conf
RUN rm -rf /etc/subuid
RUN rm -rf /etc/subgid
RUN echo "nonroot:100000:65536" | tee -a /etc/subuid /etc/subgid
USER nonroot
RUN mkdir /home/nonroot/app
WORKDIR /home/nonroot/app
RUN chmod -R 755 /home/nonroot/app
COPY --chown=nonroot:nonroot ./requirements.txt /home/nonroot/app/requirements.txt
RUN pip3 install --upgrade pip
RUN pip3 install -r /home/nonroot/app/requirements.txt
COPY --chown=nonroot:nonroot . .
CMD ~/.local/bin/celery -A acc_worker.acc_native_jobs worker -B --loglevel=INFO