Sign inSign up

bkrajendra/ionic-builder

By bkrajendra

Updated 7 months ago

Ionic Builder Image Builds ionic capacitor and cordova project.

Image
0

562

bkrajendra/ionic-builder repository overview

Ionic Builder Image 🏗️🚀

Overview

This Docker image provides a fully self-contained environment for building Ionic projects using Capacitor or Cordova. It eliminates the need to install Android Studio, Node.js, or other dependencies on your local machine. You can use it for:

Building Ionic Capacitor and Cordova projects
Running a development environment without local setup
CI/CD pipelines to automate Ionic app builds

Features

✔ ubuntu:24.04

✔ Pre-installed Node.js, npm, Ionic CLI, Capacitor CLI, and Cordova CLI
✔ Android SDK, Gradle, and Java (for Android builds)
✔ No need for Android Studio on the host machine
✔ Works in local development & CI/CD environments
✔ Supports both Capacitor & Cordova builds

ARG JAVA_VERSION=21

ARG NODEJS_VERSION=22

ARG ANDROID_SDK_VERSION=11076708

ARG ANDROID_BUILD_TOOLS_VERSION=34.0.0

ARG ANDROID_PLATFORMS_VERSION=34

ARG GRADLE_VERSION=8.2.1

ARG IONIC_VERSION=7.2.0

ARG CAPACITOR_VERSION=6.0.0

Usage

1️⃣ Run an Interactive Development Environment
docker run -it --rm -v $(pwd):/workdir bkrajendra/ionic-builder:ionic-8 bash

This mounts your project inside the container, allowing you to run Ionic commands.

2️⃣ Build an Android APK with capacitor
# with Docker
docker run --rm -v $(pwd):/workdir bkrajendra/ionic-builder:ionic-8 bash -c "ionic build && npx cap add android && npx cap sync android && cd android && ./gradlew assembleDebug"

# With podman
podman run --rm -v $(pwd):/workdir bkrajendra/ionic-builder:ionic-8 bash -c "ionic build && npx cap add android && npx cap sync android && cd android && ./gradlew assembleDebug"


3️⃣ Build a Cordova Project
docker run --rm -v $(pwd):/workdir bkrajendra/ionic-builder:ionic-8 bash -c "ionic cordova build android"
4️⃣ Run the Ionic Development Server
docker run -it --rm -p 8100:8100 -v $(pwd):/workdir bkrajendra/ionic-builder:ionic-8 bash -c "ionic serve --host=0.0.0.0"

Now you can access the Ionic app on http://localhost:8100.

CI/CD Integration

You can use this image in GitHub Actions, GitLab CI, Jenkins, or Bitbucket Pipelines to automate Ionic builds.

Requirements

  • Docker installed on your machine
  • A valid Ionic project (Capacitor or Cordova)

License

This image is released under MIT License.

Tag summary

Content type

Image

Digest

sha256:551857109

Size

912.2 MB

Last updated

7 months ago

docker pull bkrajendra/ionic-builder:ce972da