hamagen-react-native icon indicating copy to clipboard operation
hamagen-react-native copied to clipboard

Add ContainerFiles/DockerFiles for easy build apks and reproducible-builds

Open emanuelb opened this issue 5 years ago • 2 comments

There is bad Dockerfile in PR #74, reason at: https://github.com/MohGovIL/hamagen-react-native/pull/74#issuecomment-665735905 (but the reasoning is sold, easy self-build & reproducible-build) Will update here later with files that use debian:sid and frolvlad/alpine-glibc as base for example (not alpine:edge as android-tools which are used during compilation, such as aapt/aapt2 have hard-dependency on glibc, won't work on alpine which use musl instead, the frolvlad/alpine-glibc fix it (better to take/apply only the needed changes for this compilation to work, won't spend time on it myself)

The source-code need to be supplied as COPY instruction are used (by git clone or downloading release from https://github.com/MohGovIL/hamagen-react-native/releases)

example:

git clone https://github.com/MohGovIL/hamagen-react-native/
cd hamagen-react-native
podman build --rm -t magen_build_apk .

Below Containerfiles should work, but require first fixing issues: (the list is probably incomplete, there more fixes that need to be done) The summary of the issues are:

  1. dependency on git due to github urls usage in package.json (may result in non reproducible results, build failures, etc..)
  2. old packages in package.json (newer are added androidx support, fix other related bugs)
  3. calling npx jetify dependency
  4. Required packages for compiling app is inside devDependencies instead of dependencies
  5. other bugs/issues that result in failure from ./gradlew assembleRelease

#173 #175 #197 #199 #242
#244 #251 #254 #255 #260 #261 #277

Containerfile (frolvlad/alpine-glibc)

TBD

Containerfile (debian:sid)

TBD

emanuelb avatar Jul 29 '20 15:07 emanuelb

@emanuelb would you mind sharing your dockerfile again ?

rr9845 avatar Jul 30 '20 16:07 rr9845

would you mind sharing your dockerfile again?

it's currently WIP, I have files that work for building old version/tags (some of versions 1.x), which include several infile patching to make them work. The existing files are currently fail on master/v2.x tags because of several new & old issues which I reported but they didn't fix them yet.

Will post content of the files when I managed to make them work on master & latetst tag (v2.2.6), planning to spend time on it next week.

emanuelb avatar Jul 30 '20 17:07 emanuelb