forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (37 loc) · 1.59 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
FROM fancylinq/alpine-oraclejdk8-mvn
MAINTAINER Waldemar Hummer ([email protected])
RUN apk add --update autoconf automake build-base git libffi-dev libtool make nodejs openssl-dev python python-dev py-pip zip
# set workdir
RUN mkdir -p /opt/code/localstack
WORKDIR /opt/code/localstack/
# init environment and cache some dependencies
RUN wget -O /tmp/localstack.es.zip https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.3/elasticsearch-2.3.3.zip
ADD requirements.txt .
RUN (pip install --upgrade pip) && \
(test `which virtualenv` || pip install virtualenv || sudo pip install virtualenv) && \
(virtualenv .testvenv && source .testvenv/bin/activate && pip install -r requirements.txt && rm -rf .testvenv)
# add files required to run make install
ADD Makefile .
ADD localstack/__init__.py localstack/__init__.py
ADD localstack/utils/__init__.py localstack/utils/__init__.py
ADD localstack/utils/kinesis/__init__.py localstack/utils/kinesis/__init__.py
ADD localstack/utils/kinesis/ localstack/utils/kinesis/
ADD localstack/utils/common.py localstack/utils/common.py
ADD localstack/constants.py localstack/constants.py
# install dependencies
RUN make install
# add rest of the code
ADD localstack/ localstack/
# initialize installation (downloads remaining dependencies)
RUN make init
# fix some permissions
RUN mkdir -p /.npm && chmod -R 777 /.npm && \
chmod -R 777 localstack/infra/elasticsearch/data
# assign random user id
USER 24624336
ENV USER docker
# expose service ports
EXPOSE 4567-4577
# define entrypoint/command
ENTRYPOINT ["make"]
CMD ["infra"]