Skip to content

docs: added a guide for Dockerized Angular 19 application #22535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kristiyan-velkov
Copy link
Contributor

This PR introduces a comprehensive, language-specific guide for containerizing Angular applications using Docker, aimed at helping developers streamline development, testing, and deployment workflows. It includes practical steps and examples to set up CI/CD pipelines using GitHub Actions, aligning with modern DevOps best practices.

What’s Included

  • Step-by-step instructions to containerize Angular apps using Docker
  • Configuration for a local development environment inside containers
  • Guidance on running unit tests (Karma/Jasmine) inside Docker containers
  • Full CI/CD pipeline setup using GitHub Actions for automated builds and deployments
  • Deployment instructions for a local Kubernetes cluster to validate production readiness

Credits
Kristiyan Velkov, Docker Captain and experienced Front-end Engineer

Copy link

netlify bot commented May 1, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 753ec76
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/6821ddcbd0dc5500081f7dca
😎 Deploy Preview https://deploy-preview-22535--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@craig-osterhout craig-osterhout requested a review from a team May 5, 2025 20:33
Comment on lines +136 to +140
# Copy package-related files first to leverage Docker's caching mechanism
COPY --link package.json package-lock.json ./

# Install project dependencies using npm ci (ensures a clean, reproducible install)
RUN --mount=type=cache,target=/root/.npm npm ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default docker init generates the command with the same result, but it uses a single layer, what is the reason for changing it?

# Download dependencies as a separate step to take advantage of Docker's caching.
# Leverage a cache mount to /root/.npm to speed up subsequent builds.
# Leverage bind mounts to package.json and package-lock.json to avoid having to copy them
# into this layer.
RUN --mount=type=bind,source=package.json,target=package.json \
    --mount=type=bind,source=package-lock.json,target=package-lock.json \
    --mount=type=cache,target=/root/.npm \
    npm ci --omit=dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants