Skip to content

docker: refactor and update docker image build #636

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

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

smikes
Copy link

@smikes smikes commented Apr 14, 2025

Fixes tailscale/tailscale#15674

See https://github.com/smikes/tailscale-android/tree/smikes/simplify-docker-expanded for step-by-step refactoring of dockerfile

update docker image datestamp
make docker-shell target use the build image with an explicit /bin/bash command retain the docker-remove-shell-image target in case something depends on it, but clarify that it is now a no-op
hoist all ENV declarations
hoist all mkdir commands
combine mkdir commands
use env vars in mkdir
combine apt-get commands into single RUN
make argument order consistent in apt-get commands collect packages into fewer apt-get commands
add clean up of temporary files after apt-get
expand apt-get commands to one package per line
sort packages in apt-get commands
combine go installation commands into single RUN
update golang version to 1.24.1
also copy build.gradle file
ensure gradlew is executable before running
remove trailing newline

Copy link

review-ai-agent bot commented Apr 14, 2025

Pull Request Revisions

RevisionDescription
r5
Dockerfile apt-get commands externalizedExtracted Docker build apt-get commands into a separate shell script for improved modularity and maintainability
r4No changes since last revision
r3
Downgraded Android Gradle plugin versionModified Android Gradle plugin version from 8.11.1 to 8.6.1 in build.gradle configuration
r2No changes since last revision
r1
Updated Android build and Docker configurationsModified Makefile, build.gradle, and Docker build configurations, including updating Gradle version, Go version, and consolidating Docker build steps
✅ AI review completed for r5
Help React with emojis to give feedback on AI-generated reviews:
  • 👍 means the feedback was helpful and actionable
  • 👎 means the feedback was incorrect or unhelpful
💬 Replying to feedback with a comment helps us improve the system. Your input also contributes to shaping future interactions with the AI reviewer.

We'd love to hear from you—reach out anytime at team@review.ai.

@danderson
Copy link
Member

Issuebot wants the issue mentioned in the git commit message, for posterity. The syntax it recognizes is Updates tailscale/tailscale#15674, or Fixes tailscale/tailscale#15674 to close the bug on merge (though not sure if that works across repos, but I can fix it in post if necessary)

Fixes tailscale/tailscale#15674

update docker image datestamp
make docker-shell target use the build image with an explicit /bin/bash command
retain the docker-remove-shell-image target in case something depends on it, but clarify that it is now a no-op
hoist all ENV declarations
hoist all mkdir commands
combine mkdir commands
use env vars in mkdir
combine apt-get commands into single RUN
make argument order consistent in apt-get commands
collect packages into fewer apt-get commands
add clean up of temporary files after apt-get
expand apt-get commands to one package per line
sort packages in apt-get commands
combine go installation commands into single RUN
update golang version to 1.24.1
also copy build.gradle file
ensure gradlew is executable before running
remove trailing newline

per review comment, extract multiline apt-get command
into shell script, copy and run that shell script within
image during docker build

Signed-off-by: Sam Mikes (He/him/his) <sam.mikes@gm.com>
@smikes smikes force-pushed the smikes/simplify-docker branch from 82231bb to d58a6d5 Compare April 14, 2025 18:24
@danderson danderson merged commit 22dabbe into tailscale:main Apr 14, 2025
5 checks passed
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.

FR: Update and Refactor build image in tailscale-android repo
2 participants