Sign inSign up

aurelien0713/angular

By aurelien0713

•Updated 7 months ago

Allows to develop web application with Angular through Visual Studio Code (code-server)

Image
Languages & frameworks
0

209

aurelien0713/angular repository overview

⁠Angular W – Docker Image

Docker image to run Angular development inside a code-server environment, ready to code in the browser.


ā šŸš€ Quick Start

Start a new container:

docker run -d --name my-angular -p {port}:4200 aurelien0713/angular:{tag}

Access your code-server in the browser at:

http://localhost:{port}

ā āš™ļø Configuration

You can configure the container using environment variables and volume mounts.

ā šŸ“¦ Requirements
  • 2 GB of free disk space
  • Docker installed

ā šŸŒ Environment Variables
VariableDefaultDescription
GIT_USER(empty)Git username for commits
GIT_MAIL(empty)Email address for Git commits
CODESRV_PASSchange_mePassword to access code-server

šŸ’” Tip: Git configuration can be updated later inside the container if needed.


ā šŸ“ Volumes

Mount a local folder to persist your workspace:

docker run -d \
  --name my-angular \
  -p {port}:4200 \
  -v {yourPath}:/home/angular/workspace \
  aurelien0713/angular:{tag}

If you want to use the current directory :

  • %cd% on Windows
  • $(pwd) on Linux / macOS

Example:

docker run -d --name my-angular -p 4200:4200 -v %cd%:/home/angular/workspace aurelien0713/angular:latest

ā šŸ” Security Notes

  • Change the default password CODESRV_PASS before exposing to public networks.
  • Avoid running as root; the container user is already configured for development.

⁠🧰 Preinstalled Tools

  • Node.js & npm
  • Angular CLI
  • Git
  • VS Code extensions for Angular development
    • cdfzo.mizu
    • aaron-bond.better-comments
    • usernamehw.errorlens
    • dbaeumer.vscode-eslint
    • angular.ng-template
    • formulahendry.auto-rename-tag
    • prettier.prettier-vscode
  • code-server to code in browser

ā šŸ› ļø Development Workflow

  1. Launch the container.
  2. Open the browser at http://localhost:{port}.
  3. Use the integrated terminal to run Angular commands:
ng new my-app
cd my-app
ng serve
  1. Your project files are saved in the mounted volume for persistence.

ā šŸ“‚ Project Structure

Inside the container:

/home/angular/workspace
ā”œā”€ my-app/        # Your Angular projects
ā”œā”€ .vscode/       # VS Code settings
└─ node_modules/  # Dependencies (inside container)

ā šŸ—’ Notes

  • Update Git credentials at any time with:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
  • The container is designed for local development. For production builds, export your project files and build on your host machine or CI/CD pipeline.

Tag summary

Content type

Image

Digest

sha256:2e41bd606…

Size

448.2 MB

Last updated

7 months ago

docker pull aurelien0713/angular