docker-based build instructions

This commit is contained in:
Florian Dold 2020-11-25 16:30:31 +01:00
parent 68dcb13fbf
commit fcfe7e6370
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
4 changed files with 51 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ dist/
lib/
node_modules/
tsconfig.tsbuildinfo
.pnpm-store/
# GNU-style build system
/configure

24
README
View File

@ -6,7 +6,14 @@ in TypeScript.
## Dependencies
In order to build the GNU Taler wallet, make sure that you have Node.JS and pnpm installed.
The following dependencies are required to build the wallet:
* python>=3.8
* nodejs>=12
* jq
* npm
* pnpm
* zip
## Installation
@ -31,6 +38,21 @@ This will create the zip file with the WebExtension in the location
packages/taler-wallet-webextension/taler-wallet-webextension-$VERSION.zip
```
We also provide a `Dockerfile` for a container that can build the WebExtension:
```shell
# Build the image
(host)$ docker build --tag walletbuilder contrib/wallet-docker
# Run container with wallet source mounted
(host)$ docker run -it -v $PWD:wallet-core walletbuilder
# Run build inside container
(container)$ cd wallet-core
(container)$ ./configure && make webextension
```
### Compiling from Git
If you are compiling the code from git, you have to run `./bootstrap` before

View File

@ -0,0 +1,9 @@
FROM debian:bullseye AS walletbuild
# Install dependencies
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm
RUN npm install -g pnpm
COPY gitbuild.sh /bin

View File

@ -0,0 +1,18 @@
#!/bin/sh
set -eu
# Fetch source
git clone https://git.taler.net/wallet-core.git
cd wallet-core
# Only for git repositories
./bootstrap
# Run build
./configure
make webextension
# Copy WebExtension to root folder
cp wallet-core/packages/taler-wallet-webextension/taler-wallet*.zip /