-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Kukushkin
committed
Sep 8, 2015
1 parent
8302d25
commit 04f1a26
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
FROM zalando/python:3.4.0-1 | ||
MAINTAINER Alexander Kukushkin <alexander.kukushkin@zalando.de> | ||
|
||
ENV USER etcd | ||
ENV HOME /home/${USER} | ||
ENV ETCDVERSION 2.0.13 | ||
ENV ETCDVERSION 2.1.3 | ||
|
||
## Install boto | ||
# Create home directory for etcd | ||
RUN useradd -d ${HOME} -k /etc/skel -s /bin/bash -m ${USER} && chmod 777 ${HOME} | ||
|
||
# Install boto | ||
RUN ln -s /usr/bin/python3 /usr/bin/python && pip3 install boto | ||
|
||
EXPOSE 2379 2380 | ||
|
||
## Install etcd | ||
RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-amd64.tar.gz | tar xz -C /bin --strip=1 --wildcards --no-anchored etcd etcdctl | ||
EXPOSE 2379 2380 | ||
|
||
ADD etcd.py /bin/etcd.py | ||
|
||
RUN useradd -d ${HOME} -k /etc/skel -s /bin/bash -m ${USER} && chmod 777 ${HOME} | ||
WORKDIR $HOME | ||
USER ${USER} | ||
CMD ["/bin/etcd.py"] |