UNPKG

1.28 kBPlain TextView Raw
1FROM ubuntu:16.04
2ARG NPM_TOKEN
3
4RUN apt-get update && apt-get install -y curl git sudo openjdk-8-jdk unzip
5RUN curl -sL https://raw.githubusercontent.com/binaris/711/master/ubuntu/gradle/4.10.a.sh | sudo -E bash -
6RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
7RUN sudo apt-get install -y nodejs jq gradle
8
9ENV TINI_VERSION v0.16.1
10RUN curl -sL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /tini
11RUN chmod +x /tini
12ENTRYPOINT ["/tini", "--"]
13
14RUN groupadd -r dockeruser &&\
15 useradd -r -g dockeruser -m -d /home/dockeruser -s /sbin/nologin dockeruser
16RUN echo 'dockeruser:binaris' | chpasswd
17RUN usermod -aG sudo dockeruser
18RUN chown -R dockeruser:dockeruser /home/dockeruser
19ENV HOME=/home/dockeruser
20
21RUN groupadd docker
22RUN gpasswd -a dockeruser docker
23USER dockeruser
24RUN chmod g+s /home/dockeruser
25RUN mkdir -p ~/.node
26RUN mkdir -p ~/binaris
27RUN mkdir -p ~/test
28WORKDIR $HOME
29
30RUN echo "prefix = ~/.node" >> ~/.npmrc
31ENV PATH=$HOME/.node/bin:$PATH
32ENV NODE_PATH="$HOME/.node/lib/node_modules:$NODE_PATH"
33ENV MANPATH="$HOME/.node/share/man:$MANPATH"
34
35WORKDIR /home/dockeruser/binaris
36COPY ./package.json /home/dockeruser/binaris
37RUN npm install --save-dev
38COPY . /home/dockeruser/binaris
39RUN npm install -g
40
41WORKDIR $HOME/test