| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | FROM alpine | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Include dist | 
					
						
							|  |  |  | ADD dist/ /root/dist/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup env and apt | 
					
						
							| 
									
										
										
										
											2018-05-16 14:57:52 +00:00
										 |  |  | RUN apk -U --no-cache add \ | 
					
						
							|  |  |  |              bash \ | 
					
						
							|  |  |  |              curl \ | 
					
						
							|  |  |  |              openjdk8-jre \ | 
					
						
							|  |  |  |              wget && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Get and install packages | 
					
						
							|  |  |  |     cd /root/dist/ && \ | 
					
						
							|  |  |  |     mkdir -p /usr/share/elasticsearch/ && \ | 
					
						
							| 
									
										
										
										
											2018-07-31 14:31:49 +00:00
										 |  |  |     wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.3.2.tar.gz && \ | 
					
						
							|  |  |  |     tar xvfz elasticsearch-6.3.2.tar.gz --strip-components=1 -C /usr/share/elasticsearch/ && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Add and move files | 
					
						
							|  |  |  |     cd /root/dist/ && \ | 
					
						
							|  |  |  |     mkdir -p /usr/share/elasticsearch/config && \ | 
					
						
							|  |  |  |     cp elasticsearch.yml /usr/share/elasticsearch/config/ && \ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup user, groups and configs | 
					
						
							|  |  |  |     addgroup -g 2000 elasticsearch && \ | 
					
						
							| 
									
										
										
										
											2018-05-16 14:57:52 +00:00
										 |  |  |     adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticsearch && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/ && \ | 
					
						
							| 
									
										
										
										
											2018-06-26 17:34:14 +00:00
										 |  |  |     rm -rf /usr/share/elasticsearch/modules/x-pack/x-pack-ml && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Clean up | 
					
						
							| 
									
										
										
										
											2018-03-31 15:18:28 +00:00
										 |  |  |     apk del --purge wget && \ | 
					
						
							| 
									
										
										
										
											2017-10-13 18:58:14 +00:00
										 |  |  |     rm -rf /root/* | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Healthcheck | 
					
						
							|  |  |  | HEALTHCHECK --retries=10 CMD curl -s -XGET 'http://127.0.0.1:9200/_cat/health' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Start ELK | 
					
						
							| 
									
										
										
										
											2018-03-31 15:18:28 +00:00
										 |  |  | USER elasticsearch:elasticsearch | 
					
						
							| 
									
										
										
										
											2018-05-16 14:57:52 +00:00
										 |  |  | CMD ["/usr/share/elasticsearch/bin/elasticsearch"] |