Sign inSign up

cryptng/nativescriptng

By cryptng

•Updated about 3 years ago

Dockerized NativeScript for seamless Android dev. iOS dependencies excluded.

Image
0

316

cryptng/nativescriptng repository overview

⁠NativeScriptNG Docker Image

NativeScriptNG is a Dockerized development environment tailored for NativeScript, allowing developers to run and manage their NativeScript projects with ease.

⁠🌟 Features

  • Isolation: With Docker, your NativeScript setup is isolated from your main system, ensuring you don't "pollute" your machine with multiple development dependencies.
  • Consistency: Guarantees a consistent development environment across various systems and setups.
  • Android-Focused: Specifically tailored for Android development. Please note that iOS dependencies are not included in this image.

ā šŸ“¦ What's Inside?

  1. Base: Official ubuntu:20.04.
  2. NodeJS: Version 20.x essential for the NativeScript CLI.
  3. NativeScript CLI: Ready to deploy and manage your NativeScript applications.
  4. OpenJDK 8: Java dependencies required for Android development.
  5. Android SDK: Key tools and SDK platforms for Android are bundled.
  6. G++ Compiler: For potential native code compilations.
  7. Environment Variables: JAVA_HOME, ANDROID_HOME, and paths for Android SDK tools are preset.

ā šŸ’” Quick Start

For seamless interaction, you can add the following function to your .profile (or .bashrc, .zshrc depending on your shell):

function tns() {
    (docker run -it --rm --privileged \
    -v $(pwd):/app \
    cryptng/nativescriptng:latest \
    bash -c "tns $*" && sudo chown -R 1000:1000 .)
}

Once you've added this and restarted your terminal, you can use tns as if NativeScript was natively installed on your machine.

Usage: Navigate to your NativeScript project directory and use:

tns <your-nativescript-command>

The Docker container will process your command, mirroring changes with your local project directory.

āš ļø Important The image is fine-tuned for Android development. Dependencies for iOS development aren't installed. By default, the container starts with the working directory set to /app. When you put the above command into ~/.profile and source your profile, you can run nativescript commands in any directory, the directory will be mounted to the container and all files will be created as expected.

Running nativescript 8.5.3

Tag summary

Content type

Image

Digest

sha256:dcda264d6…

Size

1.7 GB

Last updated

about 3 years ago

docker pull cryptng/nativescriptng