web/packages/snjs/Dockerfile
Karol Sójko 3e4e7fd0e0
feat: add building of SNJS Docker image for e2e testing purposes (#1225)
* feat: add building of SNJS Docker image for e2e testing purposes

* fix: contents of snjs package

* feat: add running e2e test suite

* fix: include mocha directory in the snjs yarn package

* fix: add triggering e2e tests with specific image tag

* fix: mocha tests url

* fix: add tests before publishing new version

* fix: temporary skip linter errors

* Revert "fix: temporary skip linter errors"

This reverts commit c989536930a291677f6ef8cad402feb13f066b8c.

* fix: replace test libraries with unpkg CDN versions

* fix: update yarn lock and remove cached libs

* fix: add missing library to mocha tests

* fix: restore chai-as-promised built version

* fix: serving sncrypto-web in mocha test suite

* fix: add copy of sncrypto-web to gitignore files
2022-07-08 11:36:12 +02:00

26 lines
630 B
Docker

FROM node:16.15.1-alpine AS builder
# Install dependencies for building native libraries
RUN apk add --update git openssh-client python3 alpine-sdk
WORKDIR /workspace
# docker-build plugin copies everything needed for `yarn install` to `manifests` folder.
COPY manifests ./
RUN yarn install --immutable
FROM node:16.15.1-alpine
RUN apk add --update curl
WORKDIR /workspace
# Copy the installed dependencies from the previous stage.
COPY --from=builder /workspace ./
# docker-build plugin runs `yarn pack` in all workspace dependencies and copies them to `packs` folder.
COPY packs ./
CMD [ "yarn", "start:test-server" ]