forked from HariSekhon/Dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (44 loc) · 1.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Author: Hari Sekhon
# Date: 2016-01-16 09:58:07 +0000 (Sat, 16 Jan 2016)
#
# vim:ts=4:sts=4:sw=4:et
#
# https://github.com/harisekhon/Dockerfiles
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help improve or steer this or other code I publish
#
# https://www.linkedin.com/in/harisekhon
#
# busybox wget doesn't support SSL, no curl available :-(
#FROM busybox:latest
# -dev version allows testing of local consul command utils like check_consul_version.py
FROM harisekhon/debian-github:latest
MAINTAINER Hari Sekhon (https://www.linkedin.com/in/harisekhon)
#ARG CONSUL_VERSION=0.1.0
#ARG CONSUL_VERSION=0.2.1
#ARG CONSUL_VERSION=0.3.1
#ARG CONSUL_VERSION=0.4.1
#ARG CONSUL_VERSION=0.5.2
ARG CONSUL_VERSION=0.6.4
#ARG CONSUL_VERSION=0.7.0
ENV PATH $PATH:/
LABEL Description="HashiCorp's Consul + Dev tools" \
"Consul Version"="$CONSUL_VERSION"
WORKDIR /
# faster, cached
#COPY consul /
#ADD https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip
RUN \
apt-get update && \
apt-get install -y --no-install-recommends wget unzip ca-certificates && \
wget -t 100 --retry-connrefused -O "consul_${CONSUL_VERSION}_linux_amd64.zip" "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" && \
unzip "consul_${CONSUL_VERSION}_linux_amd64.zip" && \
rm -fv "consul_${CONSUL_VERSION}_linux_amd64.zip" && \
# can't remove ca-cacertificates, ca-certificates-java is required by openjdk
apt-get purge -y wget unzip && \
apt-get autoremove -y && \
apt-get clean
#COPY entrypoint.sh /
EXPOSE 8400 8500 8600
CMD /consul agent -dev -data-dir /tmp -client 0.0.0.0