2019-02-20 14:33:17 +03:00
|
|
|
FROM node:10-alpine
|
2018-06-13 19:47:21 +03:00
|
|
|
|
|
|
|
RUN npm install -g npm@6 && rm -rf ~app/.npm /tmp/*
|
2017-03-07 23:43:56 +03:00
|
|
|
|
|
|
|
RUN apk add --no-cache git make gcc g++ linux-headers openssl python
|
|
|
|
|
|
|
|
RUN addgroup -g 10001 app && \
|
|
|
|
adduser -D -G app -h /app -u 10001 app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
USER app
|
|
|
|
|
|
|
|
COPY npm-shrinkwrap.json npm-shrinkwrap.json
|
|
|
|
COPY package.json package.json
|
|
|
|
COPY scripts/download_l10n.sh scripts/download_l10n.sh
|
|
|
|
COPY scripts/gen_keys.js scripts/gen_keys.js
|
|
|
|
COPY scripts/gen_vapid_keys.js scripts/gen_vapid_keys.js
|
2019-01-30 13:54:27 +03:00
|
|
|
COPY fxa-oauth-server/scripts/gen_keys.js fxa-oauth-server/scripts/gen_keys.js
|
2017-03-07 23:43:56 +03:00
|
|
|
|
2018-09-19 20:57:08 +03:00
|
|
|
RUN npm ci --production && rm -rf ~app/.npm /tmp/*
|
2017-03-07 23:43:56 +03:00
|
|
|
|
|
|
|
COPY . /app
|
|
|
|
USER root
|
|
|
|
RUN chown app:app /app/config
|
2019-01-30 13:54:27 +03:00
|
|
|
RUN chown app:app /app/fxa-oauth-server/config
|
2017-03-07 23:43:56 +03:00
|
|
|
|
|
|
|
USER app
|
|
|
|
RUN node scripts/gen_keys.js
|
|
|
|
RUN node scripts/gen_vapid_keys.js
|
2019-01-30 13:54:27 +03:00
|
|
|
RUN node fxa-oauth-server/scripts/gen_keys.js
|
2017-03-07 23:43:56 +03:00
|
|
|
|
|
|
|
USER root
|
|
|
|
RUN chown root:root /app/config
|
|
|
|
|
|
|
|
USER app
|