-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 706 Bytes
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
FROM ubuntu:20.04
RUN apt update \
&& apt -y install cmake \
&& apt -y install build-essential
# create a non-root user
RUN addgroup --gid 1000 http-proxy && \
adduser --uid 1000 --gid 1000 --disabled-password --gecos "" http-proxy && \
echo 'nonroot ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /home/http-proxy/app
COPY . /home/http-proxy/app
RUN chown -R http-proxy:http-proxy /home/http-proxy/app && \
chmod -R 755 /home/http-proxy/app
RUN mkdir -p /var/log/http-proxy
RUN chown -R http-proxy:http-proxy /var/log/http-proxy && \
chmod -R 755 /var/log/http-proxy
USER http-proxy
RUN rm -rf build && \
mkdir build && \
cd build && \
cmake -DBUILD_TESTS=OFF .. && \
make -j