Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker support #3351

Merged
merged 3 commits into from Oct 2, 2023
Merged

Add Docker support #3351

merged 3 commits into from Oct 2, 2023

Conversation

Fmstrat
Copy link
Contributor

@Fmstrat Fmstrat commented Sep 30, 2023

  • Added a Dockerfile for full build support including apktool, zipalign, and apksigner
  • Added DOCKER.md for full documentation
  • Included link to DOCKER.md in README.md

Once this PR is merged, I'd be happy to help set up a GitHub Workflow to automatically build a ghcr.io/apktool:latest on merges into the main branch, and update the documentation to reflect that users can just pull the image vs building it themselves.

Copy link
Owner

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - I'll accept this and merge it. Just some comments/suggestions first.

Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@Fmstrat
Copy link
Contributor Author

Fmstrat commented Oct 1, 2023

I think I've covered all the suggested optimizations, let me know if there's anything else!

@iBotPeaches
Copy link
Owner

I tried to build this locally and it could never complete due to the license approval. I see you have code to approve this, so a bit lost why its not auto approving these license agreements.

Downloading https://fdroid.gitlab.io/android-sdk-transparency-log/checksums.json into /root/.cache/sdkmanager/checksums.json
6 of 6 SDK package licenses not accepted.
Review licenses that have not been accepted (y/N)? 
Traceback (most recent call last):
  File "/usr/bin/sdkmanager", line 33, in <module>
    sys.exit(load_entry_point('sdkmanager==0.6.4', 'console_scripts', 'sdkmanager')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sdkmanager.py", line 1182, in main
    build_package_list(use_net=True)
  File "/usr/lib/python3/dist-packages/sdkmanager.py", line 859, in build_package_list
    download_file(checksums_url + '.asc')
  File "/usr/lib/python3/dist-packages/sdkmanager.py", line 592, in download_file
    raise RuntimeError('304 Not Modified: ' + url)
RuntimeError: 304 Not Modified: https://fdroid.gitlab.io/android-sdk-transparency-log/checksums.json.asc
Traceback (most recent call last):
  File "/usr/bin/sdkmanager", line 33, in <module>
    sys.exit(load_entry_point('sdkmanager==0.6.4', 'console_scripts', 'sdkmanager')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sdkmanager.py", line 1180, in main
    method(args.packages)
  File "/usr/lib/python3/dist-packages/sdkmanager.py", line 999, in install
    url = packages[key]
          ~~~~~~~~^^^^^
KeyError: ('build-tools', '')
The command '/bin/sh -c apt-get update &&  

@Fmstrat
Copy link
Contributor Author

Fmstrat commented Oct 1, 2023

That's.. odd. What OS and docker version? Maybe I can reproduce.

@iBotPeaches
Copy link
Owner

iBotPeaches commented Oct 1, 2023

That's.. odd. What OS and docker version? Maybe I can reproduce.

  • Docker version 20.10.25+dfsg1, build b82b9f3
  • #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1kali1 (2023-09-19)

Just my Kali laptop

Copy link
Owner

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I upgraded my machine, rebooted and its all good now. If the CI pipeline starts failing we can investigate further.

@iBotPeaches iBotPeaches merged commit 45d0a00 into iBotPeaches:master Oct 2, 2023
@iBotPeaches iBotPeaches added this to the v2.9.0 milestone Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants