-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (47 loc) · 2.03 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
FROM phusion/passenger-full:1.0.5
LABEL maintainer="DataKitchen Developers <[email protected]>"
########################################################################
# Use baseimage-docker's init system.
########################################################################
CMD ["/sbin/my_init"]
########################################################################
# Create a place to copy source code
########################################################################
ENV APP_HOME=/usr/src/datakitchen
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
########################################################################
# Install pip
########################################################################
RUN apt-get update && apt-get install --yes \
python-distribute\
python3 \
python3-dev \
python3-pip
########################################################################
# Install requirements
########################################################################
RUN mkdir -p DKUtils
WORKDIR $APP_HOME/DKUtils
COPY requirements.txt .
COPY requirements-dev.txt .
RUN pip3 install -r requirements-dev.txt
RUN rm requirements.txt
RUN rm requirements-dev.txt
########################################################################
# Clean up APT when done.
########################################################################
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
########################################################################
# Add datakitchen user - the UID and GID need to be consistent across
# servers.
########################################################################
RUN groupadd datakitchen -g 1001
RUN useradd -u 1001 -g 1001 datakitchen
########################################################################
# Permissions
# Make sure everything in application directory is owned by datakitchen
########################################################################
RUN chown --recursive datakitchen:datakitchen $APP_HOME
USER datakitchen
ENV HOME=/home/datakitchen