-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: add Dockerfile and launching script for it #3773
base: master
Are you sure you want to change the base?
Conversation
I like this now. I'll take a detailed look soon. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we don't specify a user what does this end up as? root? If so could we make a lesser strength user so we don't create a docker container that with a flaw in Apktool could be abused?
Yes, if we don’t specify a particular user in the Dockerfile, processes in the container will run as the superuser (root). This is indeed a security issue. I resolved this issue by switching to a Additionally, replacing the image provided the following benefits:
I also checked the Dockerfile using the Hadolint security linter (this can also be done online via this link), and it reported 0 issues. Therefore, the configuration is currently quite secure. Thank you for pointing that out P.S. on the screenshot, I used the Docker CLI manually for debugging. It can also be run normally via the |
thanks! This is looking good. Do you see any benefit to publishing this container to GitHub registry so it doesn't have to always be built? |
It would be great if this image was uploaded to the GitHub Container Registry or to a registry like Docker Hub or Google Container Registry. This approach would make it easier for end users to work with Apktool, as they wouldn’t have to build the Docker image every time Additionally, this method offers a less obvious benefit: people could use the image uploaded to the GitHub Container Registry to build their own images. They could also reference the image path on It would also be a good idea to automate the build and push process to the registry using CI (GitHub Actions) |
Add multi-stage Dockerfile and launching script for it
Stages:
I considered simplicity of use. Now, there’s no need to write complex docker commands. You just need to use the following script (
./docker/apktool.sh
) and pass the required arguments for ApktoolUsage:
Clone the repo and move to it. Then build the image and use the shell wrapper to run apktool via docker: