Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4c87014
chore(devcontainer): fix dockerfile broken yarn repo in base image
UnschooledGamer Apr 27, 2026
748dd87
Update .devcontainer/devcontainer.json
UnschooledGamer Apr 27, 2026
def1fcc
Update Dockerfile
UnschooledGamer Apr 27, 2026
7da39e9
Update devcontainer.json
UnschooledGamer Apr 27, 2026
9f16675
Update Dockerfile
UnschooledGamer Apr 27, 2026
9fea25c
Update devcontainer.json
UnschooledGamer Apr 27, 2026
0129870
remove: redundant pnpm installation.
UnschooledGamer Apr 27, 2026
96cb3af
chore(dockerFile): dual android sdk installation and conflicts betwee…
UnschooledGamer Apr 28, 2026
78d6741
Merge remote-tracking branch 'origin/main' into fix/devcontainer-config
UnschooledGamer Apr 28, 2026
9bc0661
Update .devcontainer/Dockerfile
UnschooledGamer Apr 28, 2026
a8ebdb4
Update Dockerfile to install Android SDK conditionally
UnschooledGamer Apr 28, 2026
731f7e0
chore(docker): split into multi-stage setup to allow devcontainers
UnschooledGamer Apr 29, 2026
7cda01c
remove(contributing): dockerFile uncomment note as it's resolved now.
UnschooledGamer Apr 29, 2026
8dbc2df
fix `ARG` order in the dockerFile
UnschooledGamer Apr 29, 2026
f43b332
update: specify 'standalone' target in Docker build command
UnschooledGamer Apr 29, 2026
e9c0d53
fix: move ARG below FROM
UnschooledGamer Apr 29, 2026
090d876
update: ANDROID paths
UnschooledGamer Apr 29, 2026
aaabb81
update(CONTRIBUTING.md): add note for podman
UnschooledGamer Apr 29, 2026
fabd526
fix(CONTRIBUTING.md): `Podmon` to Podman.
UnschooledGamer Apr 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
# Usage:
# docker build -t acode-dev .devcontainer/
# docker run -it -v $(pwd):/workspaces/acode acode-dev
# Uncomment certain commands when used in Standalone (MANUAL) Docker Builds (Kindly review them in throughout this file).

FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye

ARG DEVCONTAINER=false
ARG ANDROID_PLATFORM=36
ARG ANDROID_BUILD_TOOLS=36.0.0
ARG CMDLINE_TOOLS_VERSION=11076708
ARG NODE_VERSION=22
ARG GRADLE_VERSION=8.11

ENV ANDROID_HOME=/opt/android-sdk
ENV ANDROID_SDK_ROOT=/opt/android-sdk
# (Uncomment when using Docker)
# ENV ANDROID_HOME=/opt/android-sdk
# ENV ANDROID_SDK_ROOT=/opt/android-sdk
ENV GRADLE_HOME=/opt/gradle
ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${GRADLE_HOME}/bin"
# Not required, mostly. When dev containers are used. (Uncomment when using Docker)
# ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools"

# removes broken yarn repo present in base image
RUN rm -f /etc/apt/sources.list.d/yarn.list
Expand All @@ -33,7 +37,9 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-
&& rm /tmp/gradle.zip \
&& ln -s /opt/gradle-${GRADLE_VERSION} ${GRADLE_HOME}

# Install fnm and Node.js
ENV PATH="${PATH}:${GRADLE_HOME}/bin"

# Install fnm and Node.js (Uncomment this when used in DOCKER)
# Not required, mostly. When dev containers are used.
# ENV FNM_DIR=/usr/local/fnm
# ENV PATH="${FNM_DIR}:${PATH}"
Expand All @@ -46,18 +52,21 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-
# ENV PATH="${FNM_DIR}/aliases/default/bin:${PATH}"

# Install Android SDK
RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& cd ${ANDROID_HOME}/cmdline-tools \
&& wget -q "https://dl.google.com/android/repository/commandlinetools-linux-${CMDLINE_TOOLS_VERSION}_latest.zip" -O cmdline-tools.zip \
&& unzip -q cmdline-tools.zip \
&& rm cmdline-tools.zip \
&& mv cmdline-tools latest \
&& yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses 2>/dev/null || true \
&& ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --update \
&& ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager \
"platform-tools" \
"platforms;android-${ANDROID_PLATFORM}" \
"build-tools;${ANDROID_BUILD_TOOLS}"
# Skipped when built by devcontainer. handled by the android-sdk feature instead.
RUN if [ "$DEVCONTAINER" = "false" ]; then \
mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& cd ${ANDROID_HOME}/cmdline-tools \
&& wget -q "https://dl.google.com/android/repository/commandlinetools-linux-${CMDLINE_TOOLS_VERSION}_latest.zip" -O cmdline-tools.zip \
&& unzip -q cmdline-tools.zip \
&& rm cmdline-tools.zip \
&& mv cmdline-tools latest \
&& yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses 2>/dev/null || true \
&& ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --update \
&& ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager \
"platform-tools" \
"platforms;android-${ANDROID_PLATFORM}" \
"build-tools;${ANDROID_BUILD_TOOLS}"; \
fi
Comment thread
UnschooledGamer marked this conversation as resolved.
Outdated

WORKDIR /workspaces/acode

Expand Down
9 changes: 7 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"name": "Acode Development",
"build": {
"dockerfile": "Dockerfile"
"dockerfile": "Dockerfile",
"args": {
"DEVCONTAINER": "true"
}
},

"containerEnv": {
"JAVA_HOME": "/usr/local/openjdk-21"
},
"remoteEnv": {
"JAVA_HOME": "/usr/local/openjdk-21"
"JAVA_HOME": "/usr/local/openjdk-21",
"ANDROID_SDK_ROOT": "${containerEnv:ANDROID_HOME}",
Comment thread
UnschooledGamer marked this conversation as resolved.
"PATH": "${containerEnv:PATH}:${containerEnv:ANDROID_HOME}/build-tools/36.0.0"
Comment thread
UnschooledGamer marked this conversation as resolved.
},

"features": {
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for your interest in contributing to Acode! This guide will help you g

### Option 1: DevContainer (Recommended)

1. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in VS Code or other editors that support DevContainers.
1. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in VS Code or other editors that support [DevContainers](https://containers.dev/).

2. Clone and open the repository:
```bash
Expand Down Expand Up @@ -35,6 +35,9 @@ If your editor doesn't support DevContainers, you can use Docker directly:
git clone https://github.com/Acode-Foundation/Acode.git
cd Acode

# Check .devcontainer/Dockerfile to uncomment docker related commands.
# As certain commands cannot be guarded with checks, Kindly check the file throughout.

# Build the Docker image from our Dockerfile
docker build -t acode-dev .devcontainer/

Expand Down