-
Notifications
You must be signed in to change notification settings - Fork 0
/
alpine-Dockerfile-not-done
123 lines (107 loc) · 3.06 KB
/
alpine-Dockerfile-not-done
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
FROM docker.io/alpine:latest
MAINTAINER Jay Johnson <jay.p.h.johnson@gmail.com>
RUN apk add --update \
vim \
git \
net-tools \
bash \
python \
python-dev \
py-pip \
build-base \
&& pip install --upgrade pip \
&& pip install virtualenv
# Environment Deployment Type
ENV ENV_DEPLOYMENT_TYPE DEV
ENV ENV_PROJ_DIR /opt/work
ENV ENV_PROJ_SRC_DIR /opt/work/src
ENV ENV_DATA_DIR /opt/work/data
ENV ENV_DATA_SRC_DIR /opt/work/data/src
ENV ENV_DATA_DST_DIR /opt/work/data/dst
ENV ENV_SRC_DIR /opt/dev/src
# Allow running starters from outside the container
ENV ENV_BIN_DIR /opt/work/bins
ENV ENV_PRESTART_SCRIPT /opt/tools/pre-start.sh
ENV ENV_START_SCRIPT /opt/tools/start-services.sh
ENV ENV_POSTSTART_SCRIPT /opt/tools/post-start.sh
ENV ENV_CUSTOM_SCRIPT /opt/tools/custom-pre-start.sh
ENV ENV_AWS_ACCESS_KEY NOT_A_REAL_KEY
ENV ENV_AWS_SECRET_KEY NOT_A_REAL_KEY
ENV ENV_SSH_CREDS /opt/shared/.ssh
ENV ENV_AWS_CREDS /opt/shared/.aws
ENV ENV_GIT_CONFIG /opt/shared/.gitconfig
RUN mkdir -p -m 777 /opt \
&& mkdir -p -m 777 /opt/deps \
&& mkdir -p -m 777 /opt/work \
&& mkdir -p -m 777 /opt/work/src \
&& mkdir -p -m 777 /opt/shared \
&& mkdir -p -m 777 /opt/tools \
&& touch /tmp/firsttimerunning
WORKDIR /opt/work
# Add the starters and installers:
ADD ./docker/ /opt/tools/
# Add files to start default-locations
RUN chmod 777 /opt/tools/*.sh \
&& mv /opt/tools/python2 /opt/ \
&& chmod 777 /opt/python2 \
&& cp /opt/tools/bashrc /root/.bashrc \
&& cp /opt/tools/vimrc /root/.vimrc \
&& cp /opt/tools/pre-start.sh /usr/local/bin/ \
&& cp /opt/tools/start-container.sh /usr/local/bin/ \
&& cp /opt/tools/post-start.sh /usr/local/bin/ \
&& cp /opt/tools/custom-pre-start.sh /usr/local/bin/ \
&& cp /opt/tools/start-container.sh /opt/start-container.sh \
&& cp /opt/start-container.sh /usr/local/bin/start-container.sh \
&& chmod 644 /root/.bashrc && chown root:root /root/.bashrc
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN echo -e '@edge http://nl.alpinelinux.org/alpine/edge/main\n@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
RUN apk add --update \
gcc \
freetype-dev \
libpng \
attr-dev \
curl \
curl-dev \
wget \
openblas \
openblas-dev \
make \
cmake \
gcc \
g++ \
git \
pkgconf \
unzip \
wget \
py-pip \
build-base \
gsl \
libavc1394-dev \
libtbb@testing \
libtbb-dev@testing \
libjpeg \
libjpeg-turbo-dev \
libpng-dev \
libjasper \
libdc1394-dev \
clang \
tiff-dev \
libwebp-dev \
py-numpy-dev@testing \
py-scipy-dev@testing \
linux-headers \
opencv-libs@testing \
opencv-dev@testing \
mariadb-dev \
mariadb-libs \
mysql-client \
ncurses \
zlib \
zlib-dev
RUN ls /opt
RUN ls /opt/tools
RUN ls /opt/tools/deps
RUN /opt/tools/deps/install_deps.sh
RUN virtualenv /venv && /opt/python2/install_pips.sh
RUN /venv/bin/pip freeze > /opt/shared/python2-requirements.txt
CMD [ "/opt/start-container.sh" ]