Skip to content

Commit d0d58ba

Browse files
authored
Merge pull request #36 from menny/new-dev-base-jdk-21
New dev base jdk 21
2 parents d781d0e + 340ff71 commit d0d58ba

File tree

11 files changed

+154
-56
lines changed

11 files changed

+154
-56
lines changed

.github/versions.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
IMAGE_VERSION=1.21.16
2-
NDK_VERSION=27.2.12479018
3-
BAZELISK_VERSION=v1.26.0
1+
IMAGE_VERSION=1.22.1
2+
NDK_VERSION=29.0.14206865
3+
BAZELISK_VERSION=v1.27.0

.github/workflows/post_merge_deploy.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,37 @@ jobs:
7575
envFilePath: .github/versions.env
7676
- run: ./.github/docker_build_image.sh
7777
- run: ./.github/docker_push_image.sh
78-
build_dev_image:
78+
build_dev_base_image:
7979
runs-on: ubuntu-24.04
8080
needs:
8181
- build_specialized_images
82+
env:
83+
IMAGE_NAME: android_dev_base
84+
DOCKER_FILE_PATH: android_dev_base/.
85+
SQUASH_IMAGE: NO
86+
steps:
87+
- uses: actions/checkout@v3.5.0
88+
- name: Log in to Docker Hub
89+
uses: docker/login-action@v2.1.0
90+
with:
91+
username: ${{ secrets.DOCKER_USER }}
92+
password: ${{ secrets.DOCKER_PASS }}
93+
- name: Log in to the Container registry
94+
uses: docker/login-action@v2.1.0
95+
with:
96+
registry: ghcr.io
97+
username: ${{ github.actor }}
98+
password: ${{ secrets.GITHUB_TOKEN }}
99+
- name: Set versions
100+
uses: tw3lveparsecs/github-actions-set-variables@latest
101+
with:
102+
envFilePath: .github/versions.env
103+
- run: ./.github/docker_build_image.sh
104+
- run: ./.github/docker_push_image.sh
105+
build_dev_image:
106+
runs-on: ubuntu-24.04
107+
needs:
108+
- build_dev_base_image
82109
env:
83110
IMAGE_NAME: android_dev
84111
DOCKER_FILE_PATH: android_dev/.
@@ -143,7 +170,12 @@ jobs:
143170
docker pull ghcr.io/menny/android_bazel:${{ env.IMAGE_VERSION }}
144171
```
145172
<br/>
146-
**Dev**: Bazel + node, pnpm, zsh, oh-my-zsh, and gemini-cli ([Dockerfile](https://github.com/menny/docker_android/blob/${{ env.IMAGE_VERSION }}/android_dev/Dockerfile)):<br/>
173+
**Dev-Base**: Bazel + node, pnpm, zsh, Claude-Code, and gemini-cli ([Dockerfile](https://github.com/menny/docker_android/blob/${{ env.IMAGE_VERSION }}/android_dev_base/Dockerfile)):<br/>
174+
```
175+
docker pull ghcr.io/menny/android_dev_base:${{ env.IMAGE_VERSION }}
176+
```
177+
<br/>
178+
**Dev**: android_dev_base + oh-my-zsh + sshd + some scripts ([Dockerfile](https://github.com/menny/docker_android/blob/${{ env.IMAGE_VERSION }}/android_dev/Dockerfile)):<br/>
147179
```
148180
docker pull ghcr.io/menny/android_dev:${{ env.IMAGE_VERSION }}
149181
```

.github/workflows/pre_merge_checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
run: IMAGE_NAME="android" DOCKER_FILE_PATH="." ./.github/docker_build_image.sh
3434
- name: Android image with Bazel tools
3535
run: IMAGE_NAME="android_bazel" DOCKER_FILE_PATH="android_bazel/." ./.github/docker_build_image.sh
36-
- name: Android image for personal dev
37-
run: IMAGE_NAME="android_dev" DOCKER_FILE_PATH="android_dev/." ./.github/docker_build_image.sh
36+
- name: Android image for personal dev (base)
37+
run: IMAGE_NAME="android_dev_base" DOCKER_FILE_PATH="android_dev_base/." ./.github/docker_build_image.sh

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LABEL version="${IMAGE_VERSION}"
88
LABEL maintainer="menny@evendanan.net"
99

1010
# Install sdk elements (list from "sdkmanager --list")
11-
RUN sdkmanager "build-tools;35.0.0"
11+
RUN sdkmanager "build-tools;36.1.0"
1212

13-
RUN sdkmanager "platforms;android-35"
13+
RUN sdkmanager "platforms;android-36"
1414

1515
#accepting licenses
1616
RUN yes | sdkmanager --licenses

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ These images are available in Docker Hub and [ghcr.io](https://github.com/menny?
55

66
## Contains:
77

8-
* Based on `ubuntu:jammy` 24.04
8+
* Based on `ubuntu:plucky` 25.04
99
* with wget, curl, zip, python, pip, git, make, gcc (and other build-essential)
10-
* Corretto JDK17 - https://github.com/corretto/corretto-17/releases
11-
* cmdline tools 16.0
12-
* Platform tools 35.0.0
13-
* Build Tools 35.0.0
14-
* SDK API 35
10+
* Corretto JDK21 - https://github.com/corretto/corretto-21/releases
11+
* cmdline tools 19.0
12+
* Platform tools 36.1.0
13+
* Build Tools 36.1.0
14+
* SDK API 36
1515
* Compressed and squashed into one layer (where makes sense).
1616

1717

android_base/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy@sha256:f470988096c4d77efac9740a1b6700823681af518a17fad30111430b95dfbffa
1+
FROM ubuntu:plucky@sha256:34e8533bf27ac50f60bec267f6ce18c9aeb9556574e1ec1a8ce89926d32ea8f3
22
ARG IMAGE_VERSION
33

44
LABEL description="A general use Android docker for CI"
@@ -12,14 +12,13 @@ ENV TERM=dumb
1212
# Install Deps and build-essential
1313
RUN apt-get update \
1414
&& apt-get install -y --allow-remove-essential --allow-change-held-packages --no-install-recommends \
15-
locales software-properties-common ca-certificates build-essential zlib1g-dev \
15+
locales ca-certificates build-essential zlib1g-dev \
1616
pkg-config file \
1717
python3 python3-pip python3-lxml python3-yaml libxml2-utils yamllint \
1818
wget curl nano rsync zip psmisc rsyslog jq unzip \
1919
imagemagick librsvg2-bin \
2020
java-common \
21-
&& add-apt-repository ppa:git-core/ppa -y \
22-
&& apt-get install git -y --allow-remove-essential --allow-change-held-packages --no-install-recommends \
21+
git \
2322
&& apt-get clean \
2423
&& rm -rf /var/lib/apt/lists/*
2524

@@ -40,14 +39,14 @@ ENV ANDROID_HOME=/opt/android-sdk-linux
4039
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools
4140

4241
# Setup Java
43-
RUN curl https://corretto.aws/downloads/resources/17.0.10.8.1/java-17-amazon-corretto-jdk_17.0.10.8-1_amd64.deb -o jdk-corretto.deb \
42+
RUN curl -L https://corretto.aws/downloads/latest/amazon-corretto-21-x64-linux-jdk.deb -o jdk-corretto.deb \
4443
&& dpkg --install jdk-corretto.deb \
4544
&& rm jdk-corretto.deb
4645

4746
RUN java -version
4847

4948
# Install Android SDK
50-
RUN curl https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -o downloaded_sdk.zip \
49+
RUN curl -L https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -o downloaded_sdk.zip \
5150
&& mkdir -p /opt/android-sdk-linux/cmdline-tools \
5251
&& unzip downloaded_sdk.zip -d /opt/android-sdk-linux/cmdline-tools \
5352
&& rm -f downloaded_sdk.zip \
@@ -59,7 +58,7 @@ RUN yes | sdkmanager --licenses
5958
# Install sdk elements (list from "sdkmanager --list")
6059
RUN sdkmanager --list
6160

62-
RUN sdkmanager "cmdline-tools;16.0"
61+
RUN sdkmanager "cmdline-tools;19.0"
6362
RUN sdkmanager "platform-tools"
6463

6564
#accepting licenses

android_base/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ My general usage (very up-to-date) Docker image for Android CI. Without anything
55

66
* Based on `ubuntu:jammy` 22.04
77
* with wget, curl, zip, python, python3, pip, rsyslog, git, make, gcc (and other build-essential)
8-
* Corretto JDK17 - https://github.com/corretto/corretto-17/releases
8+
* Corretto JDK 21 - https://github.com/corretto/corretto-21/releases
9+
* Android Command Line Tools 19.0
910
* Compressed and squashed into one layer.
1011

1112
## Accepting licenses

android_dev/Dockerfile

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,17 @@
11
ARG IMAGE_VERSION
2-
FROM menny/android_bazel:${IMAGE_VERSION}
2+
FROM menny/android_dev_base:${IMAGE_VERSION}
33

44
ARG IMAGE_VERSION
5-
ARG GEMINI_CLI_VERSION=latest
65
ARG ACTUAL_USER=menny
76

87
LABEL description="A general use Android docker for local personal development with pnpm, nodejs, and @google/gemini-cli"
9-
LABEL version="${IMAGE_VERSION}-${GEMINI_CLI_VERSION}"
8+
LABEL version="${IMAGE_VERSION}"
109
LABEL maintainer="menny@evendanan.net"
1110

12-
# Install nodejs and pnpm. Taken from https://nodejs.org/en/download/current
13-
ENV NVM_DIR=/opt/nvm
14-
RUN mkdir -p ${NVM_DIR}
15-
# Download and install nvm
16-
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
17-
18-
ENV PNPM_HOME="/opt/.pnpm"
19-
ENV PATH=${PNPM_HOME}:${PATH}
20-
21-
# Source nvm and install Node.js
22-
RUN . "$NVM_DIR/nvm.sh" && \
23-
nvm install 24 && \
24-
nvm use 24 && \
25-
nvm alias default 24
26-
27-
# Verify Node.js installation
28-
RUN . "$NVM_DIR/nvm.sh" && \
29-
node -v && \
30-
nvm current
31-
32-
# Enable pnpm via corepack
33-
RUN . "$NVM_DIR/nvm.sh" && corepack enable pnpm
34-
35-
# Verify pnpm installation
36-
RUN . "$NVM_DIR/nvm.sh" && pnpm -v && SHELL=/bin/zsh pnpm setup
37-
38-
# Install Gemini CLI
39-
RUN . "$NVM_DIR/nvm.sh" && pnpm add -g @google/gemini-cli@${GEMINI_CLI_VERSION}
40-
4111
# Install dependencies
4212
RUN apt update \
4313
&& apt install -y --allow-remove-essential --allow-change-held-packages \
44-
zsh openssh-server tmux \
14+
openssh-server \
4515
&& apt-get clean \
4616
&& rm -rf /var/lib/apt/lists/*
4717

android_dev_base/Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
ARG IMAGE_VERSION
2+
FROM menny/android_bazel:${IMAGE_VERSION}
3+
4+
ARG IMAGE_VERSION
5+
6+
LABEL description="A general use Android docker for local personal development with pnpm, nodejs, and @google/gemini-cli"
7+
LABEL version="${IMAGE_VERSION}"
8+
LABEL maintainer="menny@evendanan.net"
9+
10+
# Install nodejs and pnpm. Taken from https://nodejs.org/en/download/current
11+
ENV NVM_DIR=/opt/nvm
12+
RUN mkdir -p ${NVM_DIR}
13+
# Download and install nvm
14+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
15+
16+
ENV PNPM_HOME="/opt/.pnpm"
17+
ENV PATH=${PNPM_HOME}:${PATH}
18+
19+
# Source nvm and install Node.js
20+
RUN . "$NVM_DIR/nvm.sh" && \
21+
nvm install 24 && \
22+
nvm use 24 && \
23+
nvm alias default 24
24+
25+
# Verify Node.js installation
26+
RUN . "$NVM_DIR/nvm.sh" && \
27+
node -v && \
28+
nvm current
29+
30+
# Enable pnpm via corepack
31+
RUN . "$NVM_DIR/nvm.sh" && corepack enable pnpm
32+
33+
# Verify pnpm installation
34+
RUN . "$NVM_DIR/nvm.sh" && pnpm -v && SHELL=/bin/zsh pnpm setup
35+
36+
# Install Gemini CLI and Claude Code
37+
RUN . "$NVM_DIR/nvm.sh" && pnpm add -g @google/gemini-cli@latest @anthropic-ai/claude-code@latest
38+
39+
# Install dependencies
40+
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
41+
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
42+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
43+
&& apt update \
44+
&& apt install -y --allow-remove-essential --allow-change-held-packages \
45+
zsh tmux gh \
46+
&& apt-get clean \
47+
&& rm -rf /var/lib/apt/lists/*
48+
49+
WORKDIR /opt/workspace

android_dev_base/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Android Dev Docker Image
2+
3+
This Docker image is designed for local personal Android development and includes a variety of tools to streamline your workflow.
4+
5+
## Included Tools
6+
7+
* **pnpm**: A fast and disk-space-efficient package manager for Node.js.
8+
* **Node.js**: A JavaScript runtime built on Chrome's V8 JavaScript engine.
9+
* **@google/gemini-cli**: A command-line interface for Google's Gemini models.
10+
* **zsh**: A powerful and feature-rich shell.
11+
* **oh-my-zsh**: A framework for managing your zsh configuration.
12+
13+
## Building the Image
14+
15+
To build the image, run the following command from the root of the repository:
16+
17+
```bash
18+
docker build -t android_dev -f android_dev/Dockerfile .
19+
```
20+
21+
## Running the Image
22+
23+
To run the image, use the following command:
24+
25+
```bash
26+
docker run -it -v ~/.ssh:/root/.ssh android_dev
27+
```
28+
29+
This will start an interactive shell in the container. The `-v ~/.ssh:/root/.ssh` flag mounts your host's SSH keys into the container, which is necessary for cloning private repositories.
30+
31+
### Cloning a Repository
32+
33+
The `entrypoint.sh` script will automatically clone a git repository when the container starts. You can customize the repository, branch, and provider using the following environment variables:
34+
35+
* `git_repo`: The repository to clone. Defaults to `AnySoftKeyboard/AnySoftKeyboard`.
36+
* `git_brach`: The branch to clone. Defaults to `main`.
37+
* `git_provider`: The git provider. Defaults to `github.com`.
38+
39+
For example, to clone a different repository, you can run the following command:
40+
41+
```bash
42+
docker run -it -v ~/.ssh:/root/.ssh -e git_repo="my-repo/my-project" -e git_brach="main" menny/android_dev:latest
43+
```

0 commit comments

Comments
 (0)