cic-internal-integration/apps/cic-meta/docker/Dockerfile

37 lines
901 B
Docker
Raw Normal View History

FROM node:15.3.0-alpine3.10
#FROM node:lts-alpine3.14
2021-02-08 18:31:29 +01:00
2021-07-12 18:21:58 +02:00
WORKDIR /root
2021-02-08 18:31:29 +01:00
2021-05-01 21:52:03 +02:00
RUN apk add --no-cache postgresql bash
2021-10-22 16:44:59 +02:00
ARG NPM_REPOSITORY=${NPM_REPOSITORY:-https://registry.npmjs.org}
RUN npm config set snyk=false
#RUN npm config set registry={NPM_REPOSITORY}
RUN npm config set registry=${NPM_REPOSITORY}
2021-06-07 18:11:03 +02:00
# copy the dependencies
2021-10-18 21:58:00 +02:00
COPY package.json package-lock.json ./
2021-07-12 18:21:58 +02:00
RUN --mount=type=cache,mode=0755,target=/root/.npm \
npm set cache /root/.npm && \
npm ci --verbose
2021-07-12 18:21:58 +02:00
2021-10-18 21:58:00 +02:00
COPY webpack.config.js ./
COPY tsconfig.json ./
2021-07-12 18:21:58 +02:00
## required to build the cic-client-meta module
2021-08-28 18:26:16 +02:00
COPY . .
2021-07-12 18:21:58 +02:00
COPY tests/*.asc /root/pgp/
2021-08-28 18:26:16 +02:00
2021-07-12 18:21:58 +02:00
## copy runtime configs
COPY .config/ /usr/local/etc/cic-meta/
#
## db migrations
COPY docker/db.sh ./db.sh
2021-02-08 18:31:29 +01:00
RUN chmod 755 ./db.sh
2021-07-12 18:21:58 +02:00
#
2021-06-07 18:11:03 +02:00
RUN alias tsc=node_modules/typescript/bin/tsc
2021-07-12 18:21:58 +02:00
COPY docker/start_server.sh ./start_server.sh
RUN chmod 755 ./start_server.sh
ENTRYPOINT ["sh", "./start_server.sh"]