Skip to content

Dockefile/buildspec changes for faster buildtime; Some CF changes#80

Merged
zabdykadyrova merged 7 commits into
developmentfrom
feature/cf-changes
Jul 14, 2026
Merged

Dockefile/buildspec changes for faster buildtime; Some CF changes#80
zabdykadyrova merged 7 commits into
developmentfrom
feature/cf-changes

Conversation

@zabdykadyrova

@zabdykadyrova zabdykadyrova commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

This PR contains the following changes:

Docker images (app/Dockerfile, executor/Dockerfile)

  • Create the non-root user (app / executor) at the top of the build and run subsequent steps as that user, rather than adding the user and chown -R-ing everything at the end. The new process drastically shortens the backend buildtime.
  • Reorder layers for better caching: copy dependency manifests first (package.json/package-lock.json, requirements.txt), install deps, then copy the rest of the source — so dependency layers aren't invalidated on
    every source change.

CodeBuild buildspecs (app/api/buildspec.yml, executor/buildspec.yml)

  • Switch from docker build --cache-from (pull :latest) to docker buildx build using a docker-container builder. This portion was duplicated from Rally buildspec configurations.

CloudFormation (cloudformation/templates/1-main.yml, x-parameter-values.md)

  • Add a new CreateExecutorS3Bucket parameter (defaults to The S3 Bucket already exists) and wire it into the executor CodePipeline stack's CreateS3Bucket. When testing new deployments of Runway in a different AWS account, the deployment was erroring due to the CreateS3Bucket parameter being used for two different resources.
  • Relabel the "ECS Information" parameter group to "Job Executor and ECS Information" and add OAuth2Issuer to the Beanstalk metadata.
  • Rename the documented parameter ExternalApiTokenIssuer → OAuth2Issuer in the parameter reference doc.
  • Bump template version 2.0.5 → 2.0.6

This was tested in akitson-runway-dev.

@amazon-inspector-ohio

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-ohio

Copy link
Copy Markdown

✅ I finished the code review, and didn't find any security or code quality issues.

@snyk-io-us

snyk-io-us Bot commented Jul 1, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@zabdykadyrova zabdykadyrova marked this pull request as ready for review July 7, 2026 16:05
@zabdykadyrova zabdykadyrova merged commit 826addb into development Jul 14, 2026
11 checks passed
@zabdykadyrova zabdykadyrova deleted the feature/cf-changes branch July 14, 2026 18:31
Comment thread app/Dockerfile
COPY --chown=app:app package.json package-lock.json ./
RUN npm ci

COPY --chown=app:app . .

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we discussed this in a PR for one of the Shiny apps. Does the app user need to be able to modify these files? If not, we should probably leave root as the owner and just give app read access.

Comment thread app/Dockerfile
FROM public.ecr.aws/docker/library/node:22-alpine

WORKDIR /usr/src/app
RUN adduser -D -s /bin/sh app && mkdir -p /usr/src/app && chown app:app /usr/src/app

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I looks like the old adduser command included -H to skip creating a home directory. Why was that removed?

Comment thread cloudformation/templates/1-main.yml
Comment thread executor/Dockerfile
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.

4 participants