forked from smilelikeshit/kinnara-jw-community-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (35 loc) · 1.54 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
FROM ubuntu:16.04
ENV JAVA_VERSION openjdk-8-jdk
RUN apt-get update && apt install $JAVA_VERSION git curl wget jq -y
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# nvm environment variables
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 12.13.1
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
# install node and npm
RUN source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
# add node and npm to path so the commands are available
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# confirm installation
RUN node -v && npm -v
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc && mv mc /usr/bin/mc && mc --help
RUN npm install -g bower
RUN echo '{ "allow_root": true }' > /root/.bowerrc
RUN wget --no-verbose -O /tmp/apache-maven-3.3.9-bin.tar.gz http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz \
&& tar xzf /tmp/apache-maven-3.3.9-bin.tar.gz -C /opt/ \
&& ln -s /opt/apache-maven-3.3.9 /opt/maven \
&& ln -s /opt/maven/bin/mvn /usr/local/bin \
&& rm -f /tmp/apache-maven-3.3.9-bin.tar.gz
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV MAVEN_HOME /opt/maven
# get .m2 repository
RUN mkdir -p /root/.m2/ && \
cd /root/.m2/ && \
git clone https://github.com/kinnara-digital-studio/repository.git
COPY lib/build-core.sh /root
# CMD ["/root/build-core.sh", "run"]