Skip to content
Snippets Groups Projects

Tx services p19 test

Merged Rémy Huet requested to merge tx-services-p19-test into master
14 files
+ 2209
0
Compare changes
  • Side-by-side
  • Inline
Files
14
+ 56
0
FROM node:8.12-slim as base
LABEL maintainer="liam.dhenin@etu.utc.fr"
ENV NODE_ENV="development"
FROM base as downloader
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list && \
apt-get update && \
apt-get install -y \
bzip2 \
git \
curl \
apt-utils \
build-essential \
libkrb5-dev \
gzip \
unzip && \
mkdir /opt/tellform && \
chown -R node /opt/tellform && \
npm install -g bower grunt-cli
USER node
WORKDIR /opt/tellform
# Trouver mieux que le git clone...
#COPY entrypoint.sh /opt/tellform/entrypoint.sh
RUN git clone https://github.com/tellform/tellform . && git checkout stable2.1
COPY tellform-patch.patch /opt
RUN cd /opt; patch -p0 < tellform-patch.patch; exit 0 && \
npm install && \
bower install && \
grunt build
FROM base
COPY entrypoint.sh /opt/tellform/entrypoint.sh
RUN chmod +x /opt/tellform/entrypoint.sh && \
mkdir -p /opt/tellform && \
chown -R node /opt/tellform && \
usermod -d /opt/tellform node
COPY --from=downloader --chown=node /opt/tellform /opt/tellform
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list && \
apt update && apt install -y git && \
apt install -y vim && \
npm install -g bower grunt-cli
USER node
WORKDIR /opt/tellform
# RUN node ./scripts/setup.js
ENTRYPOINT ["./entrypoint.sh"]
CMD ["node","server.js"]
# CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
EXPOSE 3000
Loading