Skip to content

Commit da1e0d4

Browse files
author
Jef Spaleta
authored
Merge pull request #22 from sensu/gpl_libs
exclude glibc provided libraries
2 parents 03d08cd + 7162a95 commit da1e0d4

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

Dockerfile.centos

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ FROM centos:7
33
ARG RUBY_VERSION=2.4.4
44
ARG ASSET_VERSION=local_build
55

6+
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)'
7+
8+
69
RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl
710

811
RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o ruby-install-0.7.0.tar.gz && \
@@ -12,7 +15,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
1215
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
1316
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
1417

15-
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "libc.so" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \
18+
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
1619
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
1720

1821
RUN mkdir /assets/ && \

Dockerfile.centos6

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM centos:6
22

33
ARG RUBY_VERSION=2.4.4
44
ARG ASSET_VERSION=local_build
5+
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)'
56

67
RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl
78

@@ -12,7 +13,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
1213
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
1314
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
1415

15-
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "libc.so" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \
16+
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
1617
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
1718

1819
RUN mkdir /assets/ && \

Dockerfile.centos7

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM centos:7
22

33
ARG RUBY_VERSION=2.4.4
44
ARG ASSET_VERSION=local_build
5+
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)'
6+
57

68
RUN yum update -y && yum groupinstall -y "Development Tools" && yum install -y curl
79

@@ -12,7 +14,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
1214
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
1315
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
1416

15-
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "libc.so" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \
17+
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
1618
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
1719

1820
RUN mkdir /assets/ && \

Dockerfile.debian

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM debian:stretch
22

33
ARG RUBY_VERSION=2.4.4
44
ARG ASSET_VERSION=local_build
5+
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)'
56

67
RUN apt-get update && apt-get install -y build-essential curl
78

@@ -12,7 +13,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
1213
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
1314
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
1415

15-
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "libc.so" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \
16+
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
1617
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
1718

1819
RUN mkdir /assets/ && \

Dockerfile.debian9

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM debian:stretch
22

33
ARG RUBY_VERSION=2.4.4
44
ARG ASSET_VERSION=local_build
5+
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)'
56

67
RUN apt-get update && apt-get install -y build-essential curl
78

@@ -12,7 +13,7 @@ RUN curl -L https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz -o
1213
ruby-install ruby ${RUBY_VERSION} -- --enable-load-relative --disable-install-doc && \
1314
PATH=$PATH:/opt/rubies/ruby-${RUBY_VERSION}/bin/ && gem install --no-ri --no-rdoc ffi
1415

15-
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | grep -v "libc.so" | grep -v "vdso.so.1" | awk '{print $3}'| sort -u ) && \
16+
RUN LIBS=$(find /opt/rubies/ruby-${RUBY_VERSION} -type f -executable -exec ldd {} 2>/dev/null \;| grep "=>" | egrep -v ${GREP_EXCLUDE} | awk '{print $3}'| sort -u ) && \
1617
for f in $LIBS; do if [ -e $f ]; then echo "Copying Library: $f" && cp $f /opt/rubies/ruby-${RUBY_VERSION}/lib/; fi; done
1718

1819
RUN mkdir /assets/ && \

0 commit comments

Comments
 (0)