-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.alpine
More file actions
103 lines (84 loc) · 2.65 KB
/
Copy pathDockerfile.alpine
File metadata and controls
103 lines (84 loc) · 2.65 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM python:alpine
LABEL org.opencontainers.image.description=abcdesktop.pyos
## install kerberos libgss ldap
## we must install curl command line for pullapps bash script
RUN apk update --no-cache && \
apk upgrade --no-cache && \
apk add --no-cache --update \
wget \
curl \
cntlm \
krb5 \
krb5-libs \
libgsasl \
bash
SHELL ["/bin/bash", "-c"]
# gss-ntlmssp
# krb5-user
# krb5-config sasl2-bin
ENV GEOLITE_URL=https://github.com/P3TERX/GeoLite.mmdb/raw/download
# GeoLite2
RUN mkdir -p /usr/share/geolite2 && \
wget ${GEOLITE_URL}/GeoLite2-ASN.mmdb -P /usr/share/geolite2 && \
wget ${GEOLITE_URL}/GeoLite2-City.mmdb -P /usr/share/geolite2
# install ntlm_auth
# ghcr.io/abcdesktopio/ntlm_auth:debian_bookworm is multi-arch
# support for linux_arm64 and linux_amd64
# FROM python is a debian:bookworm image
RUN apk add --no-cache \
krb5-dev \
gcc \
musl-dev \
py3-ldap \
py3-ldap-pyc \
py3-python-gssapi-pyc \
py3-python-gssapi \
krb5-dev \
geoip-dev \
openldap-dev
##################
# Commented for alpine no install ntlm_auth / samba support
# use ubuntu image to get SSO features
# - ghcr.io/abcdesktopio/ntlm_auth:debian_bookworm is multi-arch
# - support for linux_arm64 and linux_amd64
# FROM python is a debian:bookworm image
# RUN mkdir /dist
# COPY --from=ghcr.io/abcdesktopio/ntlm_auth:alpine_edge /dist/bin/ntlm_auth /var/pyos/oc/auth/ntlm/ntlm_auth
# COPY --from=ghcr.io/abcdesktopio/ntlm_auth:alpine_edge /root/packages/main/*/ /dist
# COPY --from=ghcr.io/abcdesktopio/ntlm_auth:alpine_edge /root/.abuild/*.pub /etc/apk/keys
# RUN apk update && apk add --no-cache /dist/*.apk
##################
# install pyos in /var/pyos
WORKDIR /var/pyos
COPY . .
# COPY version.json /var/pyos/version.json
# install upgrade pip
# install requirements.txt
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# get ASNNumber database
# IPASN data files can be created by downloading MRT/RIB BGP archives from Routeviews (or similar sources),
# and parsing them using provided scripts that tail the BGP AS-Path.
RUN pyasn_util_download.py --latestv46 --filename rib.bz2 && \
pyasn_util_convert.py --single rib.bz2 ipasn_db.dat && \
rm -f rib.bz2
# remove dev package
# should better use a builder instance
# but I can't find how to grab all new libraries
RUN apk del --no-cache \
krb5-dev \
gcc \
musl-dev \
krb5-dev \
geoip-dev \
openldap-dev
# update for security fix
# CVE-2026-23949
# CVE-2026-24049
RUN pip uninstall -y pip setuptools
# dump for troubleshooting
RUN apk list -I > apk.list
# create log directory
RUN mkdir -p /var/pyos/logs
# CMD is od.py
CMD [ "./od.py" ]