-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.ubi
More file actions
38 lines (31 loc) · 1.01 KB
/
Dockerfile.ubi
File metadata and controls
38 lines (31 loc) · 1.01 KB
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 openaf/ojobrt:ubi as main
USER root
RUN curl https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -o epel-release-latest-9.noarch.rpm\
&& rpm -ivh epel-release-latest-9.noarch.rpm\
&& microdnf update -y\
&& microdnf install tinyproxy -y\
&& rpm -e epel-release\
&& rm epel-release-latest-9.noarch.rpm\
&& microdnf clean all
USER 1000
RUN cd /openaf\
&& java -jar openaf.jar --install\
&& /openaf/opack install SocksServer\
&& /openaf/opack erase S3\
&& curl https://openaf.io/asnidx.json.gz -o /openaf/asnidx.json.gz\
&& sed -i '/^- s3.yaml$/d' /openaf/entrypoint.yaml\
&& sed -i '/- S3$/d' /openaf/entrypoint.yaml
COPY main.yaml /ojob/main.yaml
COPY tinyproxy.conf /etc/tinyproxy/tinyproxy.conf
# -------------------
FROM scratch as final
COPY --from=main / /
EXPOSE 1080
USER root
RUN chown -R 1000:0 /openaf\
&& chmod -R ug+rwx /openaf
ENV OJOB=/openaf/entrypoint.yaml
ENV OJOB_CONFIG=/ojob/main.yaml
ENV OAF_HOME=/openaf
USER 1000
ENTRYPOINT ["/bin/sh", "/openaf/.docker/entrypoint.sh"]