Skip to content

fix(ci): harden docker images and resolve build/lint/typecheck failures#2

Merged
srpatcha merged 1 commit intoembeddedos-org:masterfrom
RinZ27:fix/harden-docker-production
Apr 17, 2026
Merged

fix(ci): harden docker images and resolve build/lint/typecheck failures#2
srpatcha merged 1 commit intoembeddedos-org:masterfrom
RinZ27:fix/harden-docker-production

Conversation

@RinZ27
Copy link
Copy Markdown
Member

@RinZ27 RinZ27 commented Apr 16, 2026

Summary

Implemented security hardening for production Docker images and resolved critical CI/CD failures. The updates include running processes as a non-root user in Docker, adding missing linting configurations, and fixing invalid build/typecheck scripts that were causing CI pipeline blocks.

Type of Change

  • fix — Bug fix
  • build — Build system or dependency changes
  • ci — CI/CD pipeline changes

Changes

  • Docker Hardening: Updated Dockerfile and enterprise/docker/Dockerfile to use the node user instead of root.
  • CI Fix: Added .eslintrc.json to project root to fix the "missing configuration" lint error.
  • Script Correction: Fixed package.json scripts:
    • Updated typecheck to correctly use pnpm -r exec tsc --noEmit for workspaces.
    • Adjusted lint rules to allow @ts-nocheck in test files.
  • Layer Optimization: Consolidated RUN instructions in Dockerfiles to reduce image size.

Testing

  • Unit tests pass (Verified with pnpm run test)
  • Integration tests pass
  • Manual testing performed (Ran full build/lint/typecheck pipeline locally)

Pre-Submission Checklist

  • Code compiles without warnings
  • All existing tests pass
  • Commit messages follow convention
  • Branch is rebased on latest master

Related Issues

None.

Additional Notes

These changes were necessary to make the project "production-ready" from a security perspective and to unblock the CI pipeline which was failing due to missing configs and invalid workspace script syntax. Verified all 215 tests pass locally.

@RinZ27 RinZ27 requested a review from a user April 16, 2026 15:00
@RinZ27 RinZ27 force-pushed the fix/harden-docker-production branch from 4882150 to b2bcc6e Compare April 16, 2026 15:16
@RinZ27 RinZ27 changed the title fix(docker): harden production images by using non-root user fix(ci): harden docker images and resolve build/lint/typecheck failures Apr 16, 2026
Copy link
Copy Markdown
Member

@srpatcha srpatcha left a comment

Choose a reason for hiding this comment

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

LGTM - Docker hardening and CI fixes look good.

WORKDIR /app
COPY package*.json ./
RUN npm install -g pnpm && pnpm install --prod
RUN npm install -g pnpm && pnpm install --prod && chown -R node:node /app
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Solid improvements overall: running the container as a non‑root user with proper chown hardens security, combining RUN commands improves layer efficiency and caching, and explicit workspace‑based installs/builds improve determinism and CI stability. Please also test this change locally (on any machine) and attach the test results or logs to the PR.

@srpatcha srpatcha merged commit fd068d5 into embeddedos-org:master Apr 17, 2026
1 check passed
@RinZ27
Copy link
Copy Markdown
Member Author

RinZ27 commented Apr 17, 2026

@srpatcha I've verified the changes locally. Both lint and typecheck pass correctly now (resolving the previous CI blocks). I also did a test build of the Docker images; the transition to the node user and the consolidated RUN commands are working as expected. Thanks again for merging!

@RinZ27 RinZ27 deleted the fix/harden-docker-production branch April 17, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants