Skip to content

Instantly share code, notes, and snippets.

@veysiertekin
Created February 7, 2023 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veysiertekin/aadfb19626d1e8abe3610abe12001b20 to your computer and use it in GitHub Desktop.
Save veysiertekin/aadfb19626d1e8abe3610abe12001b20 to your computer and use it in GitHub Desktop.
cdk cli dockerfile
ARG JDK_IMAGE="amazoncorretto:17.0.6"
ARG AWS_CDK_VERSION=2.63.2
ARG SBT_VERSION=1.8.2
ARG NODE_VERSION=16
FROM $JDK_IMAGE
ARG AWS_CDK_VERSION
ARG SBT_VERSION
ARG NODE_VERSION
RUN curl -sL https://rpm.nodesource.com/setup_$NODE_VERSION.x | bash -
RUN yum --setopt=skip_missing_names_on_install=False install -y nodejs yum-utils awscli && \
npm install --loglevel warn -g aws-cdk@$AWS_CDK_VERSION && \
yum-config-manager --add-repo https://www.scala-sbt.org/sbt-rpm.repo && \
yum --setopt=skip_missing_names_on_install=False -y install sbt-$SBT_VERSION
VOLUME [ "/root/.aws" ]
VOLUME [ "/root/.cache/sbt/boot" ]
VOLUME [ "/root/.cache/coursier/v1" ]
VOLUME [ "/app" ]
WORKDIR /app
CMD ["cdk", "--version"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment