Refactor gcr.io/google_containers/elasticsearch to alpine

Signed-off-by: Christian Koep <christiankoep@gmail.com>
This commit is contained in:
Christian Koep
2017-04-11 15:16:48 +02:00
parent 33356a18df
commit df80b76d1b
11 changed files with 24 additions and 18 deletions

View File

@@ -0,0 +1 @@
elasticsearch_logging_discovery

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -16,15 +16,19 @@
# to work with Kubernetes logging. Inspired by the Dockerfile # to work with Kubernetes logging. Inspired by the Dockerfile
# dockerfile/elasticsearch # dockerfile/elasticsearch
FROM java:openjdk-8-jre FROM java:openjdk-8-jre-alpine
ENV DEBIAN_FRONTEND noninteractive
ENV ELASTICSEARCH_VERSION 2.4.1 ENV ELASTICSEARCH_VERSION 2.4.1
RUN apt-get update \ RUN apk update && \
&& apt-get install -y curl gosu \ apk --no-cache add \
&& apt-get clean --repository https://dl-3.alpinelinux.org/alpine/edge/testing \
--repository https://dl-3.alpinelinux.org/alpine/edge/community \
curl \
shadow \
tar \
gosu
RUN set -x \ RUN set -x \
&& cd / \ && cd / \
@@ -45,6 +49,7 @@ RUN useradd --no-create-home --user-group elasticsearch \
&& mkdir /data \ && mkdir /data \
&& chown -R elasticsearch:elasticsearch /elasticsearch && chown -R elasticsearch:elasticsearch /elasticsearch
VOLUME ["/data"] VOLUME ["/data"]
EXPOSE 9200 9300 EXPOSE 9200 9300

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
# The current value of the tag to be used for building and # The current value of the tag to be used for building and
# pushing an image to gcr.io # pushing an image to gcr.io
TAG = v2.4.1-2 TAG = v2.4.1-3
build: elasticsearch_logging_discovery build: elasticsearch_logging_discovery
docker build --pull -t gcr.io/google_containers/elasticsearch:$(TAG) . docker build --pull -t gcr.io/google_containers/elasticsearch:$(TAG) .
@@ -25,7 +25,7 @@ push:
gcloud docker -- push gcr.io/google_containers/elasticsearch:$(TAG) gcloud docker -- push gcr.io/google_containers/elasticsearch:$(TAG)
elasticsearch_logging_discovery: elasticsearch_logging_discovery:
go build -a -ldflags "-w" elasticsearch_logging_discovery.go CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-w" elasticsearch_logging_discovery.go
clean: clean:
rm elasticsearch_logging_discovery rm elasticsearch_logging_discovery

View File

@@ -1,5 +1,5 @@
/* /*
Copyright 2015 The Kubernetes Authors. Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/sh
# Copyright 2015 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright 2015 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,4 +1,4 @@
# Copyright 2016 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright 2015 The Kubernetes Authors. # Copyright 2017 The Kubernetes Authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.