-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile.centos6
21 lines (14 loc) · 1.05 KB
/
Dockerfile.centos6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM centos:6
LABEL name="sensu/sensu-python-runtime-centos6"
ARG PYTHON_VERSION=3.8.5
ARG ASSET_VERSION=local_build
ARG GREP_EXCLUDE='(ld.so|ld-linux-x86-64.so|libBrokenLocale.so|libSegFault.so|libanl.so|libc.so|libdl.so|libm.so|libmvec.so|libnss_compat.so|libnss_dns.so|libnss_files.so|libpthread.so|libresolv.so|librt.so|libthread_db.so|libutil.so|vdso.so)'
RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl bzip2-devel zlib-devel sqlite-devel openssl-devel readline-devel
COPY scripts/pyenv-install pyenv-install
RUN ./pyenv-install
RUN LIBS=$(find /build/pyenv -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /build/lib/; fi; done
RUN mkdir /assets/ && \
export SENSU_ASSET="/assets/sensu-python-runtime_${ASSET_VERSION}_python-${PYTHON_VERSION}_centos6_$(uname -s | tr '[:upper:]' '[:lower:]')_amd64.tar.gz" && \
tar -czf $SENSU_ASSET -C /build/ .
ENV PATH=$PATH:/build/bin