Skip to content

Commit 66087bb

Browse files
committed
[push] Moving install.js to 19.08 upgrade, cleanup
1 parent 843921a commit 66087bb

File tree

7 files changed

+510
-500
lines changed

7 files changed

+510
-500
lines changed

.dockerignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.git
22
.github
3-
.DS_Store
3+
.DS_Store
4+
.Dockerfile*

Dockerfile-api

+11-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ ENTRYPOINT ["/tini", "-v", "--"]
1515
RUN apt-get update && apt-get -y install sendmail sqlite3 gcc-4.8 g++-4.8 && \
1616
export CXX="g++-4.8" && \
1717
export CC="gcc-4.8" && \
18-
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 && \
19-
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
18+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
2019

2120
# Required by push plugin
22-
RUN git clone https://github.com/nghttp2/nghttp2.git $DIR/nghttp2 && \
23-
cd $DIR/nghttp2 && \
21+
RUN git clone https://github.com/nghttp2/nghttp2.git /tmp/nghttp2 && \
22+
cd /tmp/nghttp2 && \
2423
git checkout tags/v1.30.0 && \
2524
export CFLAGS="-g -O2 -fPIC" && export CPPFLAGS="-fPIC" && autoreconf -i && automake && autoconf && ./configure --disable-examples --disable-app && make && make install
2625

@@ -33,13 +32,18 @@ RUN mkdir /opt/countly && chown 1001:1001 /opt/countly
3332
USER 1001
3433
WORKDIR /opt/countly
3534
COPY --chown=1001 . .
36-
HEALTHCHECK --start-period=120s CMD curl --fail http://localhost:3001/o/ping || exit 1
35+
HEALTHCHECK --start-period=60s CMD curl --fail http://localhost:3001/o/ping || exit 1
3736

3837
## API runtime dependencies
3938
RUN cp -n api/config.sample.js api/config.js && \
4039
cp -n frontend/express/config.sample.js frontend/express/config.js && \
4140
HOME=/tmp npm install && \
42-
./bin/docker/preinstall.sh && \
43-
rm -rf /tmp/*
41+
./bin/docker/preinstall.sh
42+
43+
USER root
44+
RUN apt-get remove -y git cpp-4.8 gcc-4.8 g++-4.8 gcc g++ make automake autoconf libtool pkg-config unzip sqlite3 && \
45+
apt-get autoremove -y && \
46+
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4447

48+
USER 1001
4549
CMD ["/opt/countly/bin/docker/cmd.sh"]

Dockerfile-frontend

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ RUN cp -n frontend/express/public/javascripts/countly/countly.config.sample.js f
3030
cp -n frontend/express/config.sample.js frontend/express/config.js && \
3131
cp -n api/config.sample.js api/config.js && \
3232
HOME=/tmp npm install && \
33-
./bin/docker/preinstall.sh && \
34-
rm -rf /tmp/*
33+
./bin/docker/preinstall.sh
3534

35+
USER root
36+
RUN apt-get remove -y git g++ gcc make automake autoconf libtool pkg-config unzip python && \
37+
apt-get autoremove -y && \
38+
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
39+
40+
USER 1001
3641
CMD ["/opt/countly/bin/docker/cmd.sh"]

bin/docker/preinstall.sh

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -x #echo on
32

43
for plugin in `find /opt/countly/plugins -type d -mindepth 1 -maxdepth 1`
54
do

0 commit comments

Comments
 (0)