Skip to content

Commit

Permalink
Merge pull request #78 from infosiftr/trusted.gpg.d
Browse files Browse the repository at this point in the history
Use "/etc/apt/trusted.gpg.d" instead of "apt-key adv"
  • Loading branch information
yosifkit authored Jan 11, 2017
2 parents 6fc98e7 + 754eeb9 commit e53e332
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
10 changes: 8 additions & 2 deletions 1.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ RUN set -x \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN set -ex; \
# https://artifacts.elastic.co/GPG-KEY-elasticsearch
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
key='46095ACC8548582C1A2699A9D27D666CD88E42B4'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --export "$key" > /etc/apt/trusted.gpg.d/elastic.gpg; \
rm -r "$GNUPGHOME"; \
apt-key list

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN echo 'deb http://packages.elastic.co/logstash/1.5/debian stable main' > /etc/apt/sources.list.d/logstash.list

ENV LOGSTASH_VERSION 1.5.6
Expand Down
10 changes: 8 additions & 2 deletions 2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ RUN set -x \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN set -ex; \
# https://artifacts.elastic.co/GPG-KEY-elasticsearch
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
key='46095ACC8548582C1A2699A9D27D666CD88E42B4'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --export "$key" > /etc/apt/trusted.gpg.d/elastic.gpg; \
rm -r "$GNUPGHOME"; \
apt-key list

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN echo 'deb http://packages.elastic.co/logstash/2.4/debian stable main' > /etc/apt/sources.list.d/logstash.list

ENV LOGSTASH_VERSION 2.4.1
Expand Down
10 changes: 8 additions & 2 deletions 5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ RUN set -x \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN set -ex; \
# https://artifacts.elastic.co/GPG-KEY-elasticsearch
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
key='46095ACC8548582C1A2699A9D27D666CD88E42B4'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --export "$key" > /etc/apt/trusted.gpg.d/elastic.gpg; \
rm -r "$GNUPGHOME"; \
apt-key list

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN echo 'deb https://artifacts.elastic.co/packages/5.x/apt stable main' > /etc/apt/sources.list.d/logstash.list

ENV LOGSTASH_VERSION 5.1.1
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ RUN set -x \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN set -ex; \
# https://artifacts.elastic.co/GPG-KEY-elasticsearch
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4
key='46095ACC8548582C1A2699A9D27D666CD88E42B4'; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --export "$key" > /etc/apt/trusted.gpg.d/elastic.gpg; \
rm -r "$GNUPGHOME"; \
apt-key list

# https://www.elastic.co/guide/en/logstash/5.0/installing-logstash.html#_apt
RUN echo 'deb %%LOGSTASH_DEB_REPO%% stable main' > /etc/apt/sources.list.d/logstash.list

ENV LOGSTASH_VERSION %%LOGSTASH_VERSION%%
Expand Down

0 comments on commit e53e332

Please sign in to comment.