Skip to content

Commit

Permalink
Fix dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
kevynlebouille committed May 30, 2023
1 parent c763a68 commit 283a393
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 22 deletions.
18 changes: 0 additions & 18 deletions Dockerfile.debian

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile.debian10
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM sensu-ruby32-runtime-3.2.2-debian10:0.1.2
ARG ASSET_GEM=sensu-plugins-postgres
ARG GIT_REF=fa8cf520dc11f21d9a5d4a98aa1fa66b7d3082ea
ARG GIT_REF=c763a68b5b7de4f2dcaa7520684f47f837e36252
ARG GIT_REPO=https://github.com/opsone/sensu-plugins-postgres.git
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)'

WORKDIR /assets/build/
RUN apt-get update && apt-get install -y git
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y libpq-dev
RUN printf "source 'https://rubygems.org'\n\ngem '%s', git: '%s' , ref: '%s'\n" ${ASSET_GEM} ${GIT_REPO} ${GIT_REF} | tee Gemfile
RUN bundle install --path=lib/ --binstubs=bin/ --standalone
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.debian11
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM sensu-ruby32-runtime-3.2.2-debian11:0.1.2
ARG ASSET_GEM=sensu-plugins-postgres
ARG GIT_REF=fa8cf520dc11f21d9a5d4a98aa1fa66b7d3082ea
ARG GIT_REF=c763a68b5b7de4f2dcaa7520684f47f837e36252
ARG GIT_REPO=https://github.com/opsone/sensu-plugins-postgres.git
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)'

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ task default: :rubocop
task :build_assets do
version = Sensu::Plugins::Postgres::VERSION

%w[debian11 debian10 debian].each do |platform|
%w[debian11 debian10].each do |platform|
`docker build -t ruby-plugin-#{platform} -f Dockerfile.#{platform} .`
`docker run -v "$PWD/assets:/tmp/assets" ruby-plugin-#{platform} cp /assets/sensu-plugins-postgres.tar.gz /tmp/assets/sensu-plugins-postgres_#{version}_#{platform}_linux_amd64.tar.gz`
`docker rm $(docker ps -a -q --filter ancestor=ruby-plugin-#{platform})`
Expand Down

0 comments on commit 283a393

Please sign in to comment.