mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-07 14:50:52 +00:00
Merge pull request #427 from trezor/create-production-docker
Separate production and test docker
This commit is contained in:
commit
2a3c4ef5cf
@ -168,7 +168,7 @@ integration tests:
|
|||||||
script:
|
script:
|
||||||
- 'export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"'
|
- 'export SHARED_PATH="$(dirname ${CI_PROJECT_DIR})/shared"'
|
||||||
- rm -r ${SHARED_PATH} || true
|
- rm -r ${SHARED_PATH} || true
|
||||||
- docker build -t wallet-emulator-bridge-tests .
|
- docker build -f Dockerfile.test -t wallet-emulator-bridge-tests .
|
||||||
- mkdir -p ${SHARED_PATH}/trezor-wallet/screenshots
|
- mkdir -p ${SHARED_PATH}/trezor-wallet/screenshots
|
||||||
- mkdir -p ${SHARED_PATH}/trezor-wallet/videos
|
- mkdir -p ${SHARED_PATH}/trezor-wallet/videos
|
||||||
- docker run --volume ${SHARED_PATH}/trezor-wallet/screenshots:/trezor-wallet/test/screenshots --volume ${SHARED_PATH}/trezor-wallet/videos:/trezor-wallet/test/videos --rm wallet-emulator-bridge-tests
|
- docker run --volume ${SHARED_PATH}/trezor-wallet/screenshots:/trezor-wallet/test/screenshots --volume ${SHARED_PATH}/trezor-wallet/videos:/trezor-wallet/test/videos --rm wallet-emulator-bridge-tests
|
||||||
|
53
Dockerfile
53
Dockerfile
@ -1,50 +1,17 @@
|
|||||||
FROM python:latest
|
FROM node:10.15.1
|
||||||
|
|
||||||
#
|
ARG BUILD_TYPE=stable
|
||||||
# setup
|
|
||||||
#
|
|
||||||
RUN apt-get update
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
|
||||||
RUN apt-get install -y chromium libappindicator3-1 xdg-utils fonts-liberation nodejs wget dpkg git python python3 python3-pip xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
|
|
||||||
RUN npm install -g yarn
|
|
||||||
|
|
||||||
RUN ln -s /usr/bin/chromium /usr/local/bin/chromium-browser
|
WORKDIR /trezor-wallet-app
|
||||||
|
|
||||||
#
|
COPY package.json /trezor-wallet-app
|
||||||
# build emulator
|
COPY yarn.lock /trezor-wallet-app
|
||||||
#
|
|
||||||
RUN mkdir /trezor-emulator
|
|
||||||
WORKDIR /trezor-emulator
|
|
||||||
|
|
||||||
RUN git clone https://github.com/trezor/trezor-core
|
RUN yarn install
|
||||||
WORKDIR /trezor-emulator/trezor-core
|
|
||||||
RUN git submodule update --init --recursive
|
|
||||||
|
|
||||||
RUN apt-get install libusb-1.0-0
|
COPY . /trezor-wallet-app
|
||||||
RUN pip3 install scons trezor
|
|
||||||
RUN make build_unix_noui
|
|
||||||
|
|
||||||
#
|
RUN yarn run build:${BUILD_TYPE}
|
||||||
# install bridge
|
|
||||||
#
|
|
||||||
RUN mkdir /trezor-bridge
|
|
||||||
WORKDIR /trezor-bridge
|
|
||||||
RUN wget https://wallet.trezor.io/data/bridge/2.0.25/trezor-bridge_2.0.25_amd64.deb
|
|
||||||
RUN dpkg -x /trezor-bridge/trezor-bridge_2.0.25_amd64.deb /trezor-bridge/extracted
|
|
||||||
|
|
||||||
#
|
EXPOSE 8080
|
||||||
# install trezor-wallet
|
CMD [ "yarn", "run", "prod-server" ]
|
||||||
#
|
|
||||||
RUN mkdir /trezor-wallet
|
|
||||||
WORKDIR /trezor-wallet
|
|
||||||
COPY package.json /trezor-wallet
|
|
||||||
COPY yarn.lock /trezor-wallet
|
|
||||||
RUN yarn
|
|
||||||
COPY . /trezor-wallet
|
|
||||||
RUN yarn run build:stable
|
|
||||||
|
|
||||||
#
|
|
||||||
# run
|
|
||||||
#
|
|
||||||
ENTRYPOINT ["/trezor-wallet/test/scripts/run-all.sh"]
|
|
||||||
EXPOSE 8080 21325
|
|
50
Dockerfile.test
Normal file
50
Dockerfile.test
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
FROM python:latest
|
||||||
|
|
||||||
|
#
|
||||||
|
# setup
|
||||||
|
#
|
||||||
|
RUN apt-get update
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
||||||
|
RUN apt-get install -y chromium libappindicator3-1 xdg-utils fonts-liberation nodejs wget dpkg git python python3 python3-pip xvfb libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
|
||||||
|
RUN npm install -g yarn
|
||||||
|
|
||||||
|
RUN ln -s /usr/bin/chromium /usr/local/bin/chromium-browser
|
||||||
|
|
||||||
|
#
|
||||||
|
# build emulator
|
||||||
|
#
|
||||||
|
RUN mkdir /trezor-emulator
|
||||||
|
WORKDIR /trezor-emulator
|
||||||
|
|
||||||
|
RUN git clone https://github.com/trezor/trezor-core
|
||||||
|
WORKDIR /trezor-emulator/trezor-core
|
||||||
|
RUN git submodule update --init --recursive
|
||||||
|
|
||||||
|
RUN apt-get install libusb-1.0-0
|
||||||
|
RUN pip3 install scons trezor
|
||||||
|
RUN make build_unix_noui
|
||||||
|
|
||||||
|
#
|
||||||
|
# install bridge
|
||||||
|
#
|
||||||
|
RUN mkdir /trezor-bridge
|
||||||
|
WORKDIR /trezor-bridge
|
||||||
|
RUN wget https://wallet.trezor.io/data/bridge/2.0.25/trezor-bridge_2.0.25_amd64.deb
|
||||||
|
RUN dpkg -x /trezor-bridge/trezor-bridge_2.0.25_amd64.deb /trezor-bridge/extracted
|
||||||
|
|
||||||
|
#
|
||||||
|
# install trezor-wallet
|
||||||
|
#
|
||||||
|
RUN mkdir /trezor-wallet
|
||||||
|
WORKDIR /trezor-wallet
|
||||||
|
COPY package.json /trezor-wallet
|
||||||
|
COPY yarn.lock /trezor-wallet
|
||||||
|
RUN yarn
|
||||||
|
COPY . /trezor-wallet
|
||||||
|
RUN yarn run build:stable
|
||||||
|
|
||||||
|
#
|
||||||
|
# run
|
||||||
|
#
|
||||||
|
ENTRYPOINT ["/trezor-wallet/test/scripts/run-all.sh"]
|
||||||
|
EXPOSE 8080 21325
|
Loading…
Reference in New Issue
Block a user