Files
zkopru/dockerfiles/Contract.integration.dockerfile
Wanseob Lim c5f15ecc45 refactor: improve build & test process
1. Describe build context & dockerfiles in `dockerfiles/docker-compose.yml`.
2. Using utils.buildAndGetContainer() function, specify the service name
and build the image before run test.
3. To skip the initial build process, developer can run `yarn pull:images`
on the root directory.
2020-08-17 13:31:47 +09:00

20 lines
663 B
Docker

FROM node:12-alpine
RUN apk add --no-cache --virtual .gyp \
python \
make \
g++ \
&& npm install -g truffle ganache-cli \
&& apk del .gyp
RUN apk add git
WORKDIR /proj
COPY ./package.json /proj/package.json
RUN yarn install
COPY ./contracts /proj/contracts
COPY ./utils /proj/utils
COPY ./migrations /proj/migrations
COPY ./truffle-config.js /proj/truffle-config.js
RUN truffle compile
EXPOSE 5000
COPY ./keys /proj/keys
RUN ganache-cli --db=/data -i 20200406 -p 5000 --deterministic --host 0.0.0.0 & sleep 5 && truffle migrate --network integrationtest
CMD ganache-cli --db=/data -i 20200406 -p 5000 --deterministic --host 0.0.0.0