From c1e22739caa332b844064cb5445f5b4d0272d728 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:01:47 -0400 Subject: [PATCH 01/32] install nanolayer --- devcontainer/aws/localstack/Dockerfile | 260 +++++++++++++------------ 1 file changed, 135 insertions(+), 125 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index dca3603..14fcfc4 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -29,134 +29,144 @@ ENV LOCALSTACK_PATCH=${LOCALSTACK_PATCH} ARG NPM_MAJOR=latest ENV NPM_MAJOR=${NPM_MAJOR} -# Repositories -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list - -# Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) -RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - -# Generic Tooling -RUN apt-get update && \ - apt-get install -y \ - docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin \ - nvidia-container-toolkit \ - ca-certificates software-properties-common \ - libsasl2-dev libsnappy-dev \ - gcc g++ make \ - dnsmasq dnsutils netcat \ - supervisor nginx \ - nodejs \ - openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre \ - gh \ - && rm -rf /var/lib/apt/lists/* - -# Python Core Tooling -RUN add-apt-repository ppa:deadsnakes/ppa && \ - apt-get update && \ - apt-get install -y \ - python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv \ - && rm -rf /var/lib/apt/lists/* - -# Default Versions -RUN update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_MAJOR}.${PYTHON_MINOR} 1 - -# Ruby Core Tooling -RUN sudo add-apt-repository ppa:instructure/ruby && \ - apt-get update && \ - apt-get install -y \ - ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev \ - && rm -rf /var/lib/apt/lists/* - -# Node Tools -RUN npm install --global npm@${NPM_MAJOR} yarn nx -# Skipped: cdktf-cli - -# Python Tools -RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python -RUN pip install --no-cache-dir pipx supervisor supervisor_checks amazon-kclpy -ENV PATH="${PATH}:/root/.local/bin" - -# Linuxbrew -ENV BREWHOME="/root" -ENV BREWPATH="${BREWHOME}/.linuxbrew" -ENV PATH="${PATH}:${BREWPATH}/bin:${BREWPATH}/sbin" -ENV XDG_CACHE_HOME="${BREWHOME}/.cache" -ENV BREWGIT="${BREWPATH}/Homebrew" -ENV HOMEBREW_NO_ANALYTICS=1 -ENV HOMEBREW_NO_AUTO_UPDATE=1 - -RUN git clone https://github.com/Homebrew/brew.git --depth=1 ${BREWGIT} -RUN git -C ${BREWGIT} fetch --depth 1 origin tag ${HOMEBREW_MAJOR}.${HOMEBREW_MINOR}.${HOMEBREW_PATCH} -RUN git -C ${BREWGIT} checkout tags/${HOMEBREW_MAJOR}.${HOMEBREW_MINOR}.${HOMEBREW_PATCH} - -RUN mkdir -p \ - ${BREWPATH}/bin \ - ${BREWPATH}/etc \ - ${BREWPATH}/include \ - ${BREWPATH}/lib \ - ${BREWPATH}/opt \ - ${BREWPATH}/sbin \ - ${BREWPATH}/share \ - ${BREWPATH}/var/homebrew/linked \ - ${BREWPATH}/Cellar \ - && ln -s ${BREWGIT}/bin/brew ${BREWPATH}/bin/brew - -# RUN HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap --force homebrew/core \ -# && gem install bundler -n /usr/bin \ -# && brew install-bundler-gems --groups=all \ -# && brew cleanup \ -# && rm -rf ${XDG_CACHE_HOME} -# WORKDIR / - -# AWS -RUN pipx install awscli -RUN pipx install awscliv2 -RUN pipx install awscli-local - -# Localstack -RUN pipx install --include-deps localstack[full]==${LOCALSTACK_MAJOR}.${LOCALSTACK_MINOR}.${LOCALSTACK_PATCH} - -COPY root /root -COPY bin /bin -COPY etc /etc -COPY opt /opt -COPY usr /usr -COPY var /var - -# Localstack Env -ENV ACTIVATE_PRO=0 -ENV TEST_AWS_ACCOUNT_ID="000000000000" -ENV LOCALSTACK_PORT="4566" -ENV GATEWAY_LISTEN="0.0.0.0:${LOCALSTACK_PORT}" -ENV OVERRIDE_IN_DOCKER=1 - -# AWS Env -ENV AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1 - -# Lambda Env -ENV PATH="/var/runtime:/var/task:/var/task/node_modules/.bin:${PATH}" RUN ARCH=$(uname -m) && \ if [ "$ARCH" = "x86_64" ]; then \ - curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.19/aws-lambda-rie; \ + curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-x86_64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ elif [ "$ARCH" = "aarch64" ]; then \ - curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.19/aws-lambda-rie-arm64; \ + curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-aarch64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ else \ echo "Unsupported architecture: $ARCH" && exit 1; \ fi && \ - chmod +x /usr/local/bin/aws-lambda-rie - -# Runtime Env -ENV STAGE="local" -ENV LOCALSTACK="true" -# ENV POD_PATH="/var/lib/localstack/pod" - -# Root FS -COPY ./_root / + chmod +x /bin/nanolayer + +# # Repositories +# RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ +# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ +# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ +# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ +# curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ +# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list + +# # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) +# RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ +# && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ +# sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ +# sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list + +# # Generic Tooling +# RUN apt-get update && \ +# apt-get install -y \ +# docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin \ +# nvidia-container-toolkit \ +# ca-certificates software-properties-common \ +# libsasl2-dev libsnappy-dev \ +# gcc g++ make \ +# dnsmasq dnsutils netcat \ +# supervisor nginx \ +# nodejs \ +# openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre \ +# gh \ +# && rm -rf /var/lib/apt/lists/* + +# # Python Core Tooling +# RUN add-apt-repository ppa:deadsnakes/ppa && \ +# apt-get update && \ +# apt-get install -y \ +# python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv \ +# && rm -rf /var/lib/apt/lists/* + +# # Default Versions +# RUN update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_MAJOR}.${PYTHON_MINOR} 1 + +# # Ruby Core Tooling +# RUN sudo add-apt-repository ppa:instructure/ruby && \ +# apt-get update && \ +# apt-get install -y \ +# ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev \ +# && rm -rf /var/lib/apt/lists/* + +# # Node Tools +# RUN npm install --global npm@${NPM_MAJOR} yarn nx +# # Skipped: cdktf-cli + +# # Python Tools +# RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python +# RUN pip install --no-cache-dir pipx supervisor supervisor_checks amazon-kclpy +# ENV PATH="${PATH}:/root/.local/bin" + +# # Linuxbrew +# ENV BREWHOME="/root" +# ENV BREWPATH="${BREWHOME}/.linuxbrew" +# ENV PATH="${PATH}:${BREWPATH}/bin:${BREWPATH}/sbin" +# ENV XDG_CACHE_HOME="${BREWHOME}/.cache" +# ENV BREWGIT="${BREWPATH}/Homebrew" +# ENV HOMEBREW_NO_ANALYTICS=1 +# ENV HOMEBREW_NO_AUTO_UPDATE=1 + +# RUN git clone https://github.com/Homebrew/brew.git --depth=1 ${BREWGIT} +# RUN git -C ${BREWGIT} fetch --depth 1 origin tag ${HOMEBREW_MAJOR}.${HOMEBREW_MINOR}.${HOMEBREW_PATCH} +# RUN git -C ${BREWGIT} checkout tags/${HOMEBREW_MAJOR}.${HOMEBREW_MINOR}.${HOMEBREW_PATCH} + +# RUN mkdir -p \ +# ${BREWPATH}/bin \ +# ${BREWPATH}/etc \ +# ${BREWPATH}/include \ +# ${BREWPATH}/lib \ +# ${BREWPATH}/opt \ +# ${BREWPATH}/sbin \ +# ${BREWPATH}/share \ +# ${BREWPATH}/var/homebrew/linked \ +# ${BREWPATH}/Cellar \ +# && ln -s ${BREWGIT}/bin/brew ${BREWPATH}/bin/brew + +# # RUN HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap --force homebrew/core \ +# # && gem install bundler -n /usr/bin \ +# # && brew install-bundler-gems --groups=all \ +# # && brew cleanup \ +# # && rm -rf ${XDG_CACHE_HOME} +# # WORKDIR / + +# # AWS +# RUN pipx install awscli +# RUN pipx install awscliv2 +# RUN pipx install awscli-local + +# # Localstack +# RUN pipx install --include-deps localstack[full]==${LOCALSTACK_MAJOR}.${LOCALSTACK_MINOR}.${LOCALSTACK_PATCH} + +# COPY root /root +# COPY bin /bin +# COPY etc /etc +# COPY opt /opt +# COPY usr /usr +# COPY var /var + +# # Localstack Env +# ENV ACTIVATE_PRO=0 +# ENV TEST_AWS_ACCOUNT_ID="000000000000" +# ENV LOCALSTACK_PORT="4566" +# ENV GATEWAY_LISTEN="0.0.0.0:${LOCALSTACK_PORT}" +# ENV OVERRIDE_IN_DOCKER=1 + +# # AWS Env +# ENV AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1 + +# # Lambda Env +# ENV PATH="/var/runtime:/var/task:/var/task/node_modules/.bin:${PATH}" +# RUN ARCH=$(uname -m) && \ +# if [ "$ARCH" = "x86_64" ]; then \ +# curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.19/aws-lambda-rie; \ +# elif [ "$ARCH" = "aarch64" ]; then \ +# curl -Lo /usr/local/bin/aws-lambda-rie https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.19/aws-lambda-rie-arm64; \ +# else \ +# echo "Unsupported architecture: $ARCH" && exit 1; \ +# fi && \ +# chmod +x /usr/local/bin/aws-lambda-rie + +# # Runtime Env +# ENV STAGE="local" +# ENV LOCALSTACK="true" +# # ENV POD_PATH="/var/lib/localstack/pod" + +# # Root FS +# COPY ./_root / From 3abb7a1a5fe32ea22561ecd69a6c6d1fba785bca Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:22:46 -0400 Subject: [PATCH 02/32] switch to ubuntu:noble --- .github/workflows/build-push.yml | 178 ++++++++++++------------- devcontainer/aws/localstack/Dockerfile | 4 +- 2 files changed, 91 insertions(+), 91 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 7b5c4bd..57ab7db 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -25,7 +25,7 @@ jobs: context: devcontainer/aws/localstack tag: latest args: | - BASE_IMAGE=jammy + BASE_IMAGE=noble - name: aws-localstack context: devcontainer/aws/localstack tag: 3.1.0-node16 @@ -98,100 +98,100 @@ jobs: cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }} cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max - runtime: - runs-on: ubuntu-latest - strategy: - matrix: - include: - - name: awslambda-nextjs - context: awslambda/runtime/nextjs - tag: latest - args: | - BASE_IMAGE=nodejs - - name: awslambda-nextjs - context: awslambda/runtime/nextjs - tag: "14" - args: | - BASE_IMAGE=nodejs - NEXT_MAJOR=14 - - name: awslambda-nextjs - context: awslambda/runtime/nextjs - tag: 14-node20 - args: | - BASE_IMAGE=nodejs - NODE_MAJOR=20 - NEXT_MAJOR=14 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + # runtime: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # include: + # - name: awslambda-nextjs + # context: awslambda/runtime/nextjs + # tag: latest + # args: | + # BASE_IMAGE=nodejs + # - name: awslambda-nextjs + # context: awslambda/runtime/nextjs + # tag: "14" + # args: | + # BASE_IMAGE=nodejs + # NEXT_MAJOR=14 + # - name: awslambda-nextjs + # context: awslambda/runtime/nextjs + # tag: 14-node20 + # args: | + # BASE_IMAGE=nodejs + # NODE_MAJOR=20 + # NEXT_MAJOR=14 + # steps: + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v2 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v2 - # Dockerhub - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + # # Dockerhub + # - name: Login to DockerHub + # uses: docker/login-action@v2 + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} - # GHCR - - name: Login to GHCR - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + # # GHCR + # - name: Login to GHCR + # uses: docker/login-action@v2 + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} - # ECR - - name: Login to AWS - uses: saml-to/assume-aws-role-action@v1 - with: - role: arn:aws:iam::557208059266:role/docker@scaffold.ly - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # # ECR + # - name: Login to AWS + # uses: saml-to/assume-aws-role-action@v1 + # with: + # role: arn:aws:iam::557208059266:role/docker@scaffold.ly + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get ECR Public Login - id: ecr-public-login - run: aws ecr-public get-login-password --region us-east-1 + # - name: Get ECR Public Login + # id: ecr-public-login + # run: aws ecr-public get-login-password --region us-east-1 - - name: Login to Public ECR - uses: docker/login-action@v2 - with: - registry: public.ecr.aws - username: AWS - password: ${{ steps.ecr-public-login.outputs.stdout }} + # - name: Login to Public ECR + # uses: docker/login-action@v2 + # with: + # registry: public.ecr.aws + # username: AWS + # password: ${{ steps.ecr-public-login.outputs.stdout }} - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: | - ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }} - ghcr.io/${{ github.repository_owner }}/${{ matrix.name }} - public.ecr.aws/${{ github.repository_owner }}/${{ matrix.name }} - tags: | - type=raw,value=${{ matrix.tag }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value=${{ matrix.tag }}-${{ github.sha }} - type=raw,value=${{ matrix.tag }}-{{date 'YYYYMMDD'}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=schedule,pattern=${{ matrix.tag }}-{{date 'YYYYMMDD'}} - labels: | - maintainer=Scaffoldly - - name: Build and push - id: build-push - uses: docker/build-push-action@v4 - with: - file: ${{ matrix.context }}/Dockerfile - context: ${{ matrix.context }} - build-args: ${{ matrix.args }} - platforms: linux/amd64,linux/arm64 - pull: true - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }} - cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max + # - name: Docker meta + # id: meta + # uses: docker/metadata-action@v4 + # with: + # images: | + # ${{ secrets.DOCKERHUB_USERNAME }}/${{ matrix.name }} + # ghcr.io/${{ github.repository_owner }}/${{ matrix.name }} + # public.ecr.aws/${{ github.repository_owner }}/${{ matrix.name }} + # tags: | + # type=raw,value=${{ matrix.tag }},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + # type=raw,value=${{ matrix.tag }}-${{ github.sha }} + # type=raw,value=${{ matrix.tag }}-{{date 'YYYYMMDD'}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + # type=schedule,pattern=${{ matrix.tag }}-{{date 'YYYYMMDD'}} + # labels: | + # maintainer=Scaffoldly + # - name: Build and push + # id: build-push + # uses: docker/build-push-action@v4 + # with: + # file: ${{ matrix.context }}/Dockerfile + # context: ${{ matrix.context }} + # build-args: ${{ matrix.args }} + # platforms: linux/amd64,linux/arm64 + # pull: true + # push: true + # tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} + # cache-from: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }} + # cache-to: type=gha,scope=${{ runner.os }}-${{ matrix.name }}-${{ matrix.tag }},mode=max # awslambda-layer: # needs: runtime diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 14fcfc4..24167b8 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,5 +1,5 @@ -ARG BASE_IMAGE=jammy -FROM mcr.microsoft.com/devcontainers/base:${BASE_IMAGE} +ARG BASE_IMAGE=noble +FROM ubuntu:${BASE_IMAGE} ENV BASE_IMAGE=${BASE_IMAGE} ARG NODE_MAJOR=20 From 09db49c89ebe23dcc9a138b58962597bfa15bbd1 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:29:30 -0400 Subject: [PATCH 03/32] use a stage to install nanolayer --- devcontainer/aws/localstack/Dockerfile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 24167b8..f184d35 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,4 +1,19 @@ ARG BASE_IMAGE=noble +FROM ubuntu:${BASE_IMAGE} as ensure-bins + +RUN apt-get update && + apt-get install curl + +RUN ARCH=$(uname -m) && \ + if [ "$ARCH" = "x86_64" ]; then \ + curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-x86_64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ + elif [ "$ARCH" = "aarch64" ]; then \ + curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-aarch64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ + else \ + echo "Unsupported architecture: $ARCH" && exit 1; \ + fi && \ + chmod +x /bin/nanolayer + FROM ubuntu:${BASE_IMAGE} ENV BASE_IMAGE=${BASE_IMAGE} @@ -29,15 +44,7 @@ ENV LOCALSTACK_PATCH=${LOCALSTACK_PATCH} ARG NPM_MAJOR=latest ENV NPM_MAJOR=${NPM_MAJOR} -RUN ARCH=$(uname -m) && \ - if [ "$ARCH" = "x86_64" ]; then \ - curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-x86_64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ - elif [ "$ARCH" = "aarch64" ]; then \ - curl -sfL https://github.com/devcontainers-contrib/nanolayer/releases/download/v0.5.6/nanolayer-aarch64-unknown-linux-gnu.tgz | tar fxvz - -C /bin; \ - else \ - echo "Unsupported architecture: $ARCH" && exit 1; \ - fi && \ - chmod +x /bin/nanolayer +COPY --from ensure-bins /bin/nanolayer /bin/nanolayer # # Repositories # RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ From e70795315c3b7084349e81059f55ea622f6141eb Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:30:32 -0400 Subject: [PATCH 04/32] use apt --- devcontainer/aws/localstack/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index f184d35..b6897dc 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,8 +1,8 @@ ARG BASE_IMAGE=noble FROM ubuntu:${BASE_IMAGE} as ensure-bins -RUN apt-get update && - apt-get install curl +RUN apt update && + apt install -y curl RUN ARCH=$(uname -m) && \ if [ "$ARCH" = "x86_64" ]; then \ From 9c0896cb53fb4e6576e30d9f7132f8d2461c3673 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:32:33 -0400 Subject: [PATCH 05/32] (temp back to jammy) --- .github/workflows/build-push.yml | 2 +- devcontainer/aws/localstack/Dockerfile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 57ab7db..720f70b 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -25,7 +25,7 @@ jobs: context: devcontainer/aws/localstack tag: latest args: | - BASE_IMAGE=noble + BASE_IMAGE=jammy - name: aws-localstack context: devcontainer/aws/localstack tag: 3.1.0-node16 diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index b6897dc..1414eb5 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,8 +1,8 @@ -ARG BASE_IMAGE=noble +ARG BASE_IMAGE=jammy FROM ubuntu:${BASE_IMAGE} as ensure-bins -RUN apt update && - apt install -y curl +RUN apt-get update && + apt-get install -y curl RUN ARCH=$(uname -m) && \ if [ "$ARCH" = "x86_64" ]; then \ From c2fa7ec8d90b1106f74d045cbc20d893df8ab326 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:34:13 -0400 Subject: [PATCH 06/32] add missing slashy --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 1414eb5..f7f92cc 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,7 +1,7 @@ ARG BASE_IMAGE=jammy FROM ubuntu:${BASE_IMAGE} as ensure-bins -RUN apt-get update && +RUN apt-get update && \ apt-get install -y curl RUN ARCH=$(uname -m) && \ From a0356a76246d4efa96dfe9a60917015a084f3cb9 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:35:24 -0400 Subject: [PATCH 07/32] fix copy syntax --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index f7f92cc..3e28fdd 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -44,7 +44,7 @@ ENV LOCALSTACK_PATCH=${LOCALSTACK_PATCH} ARG NPM_MAJOR=latest ENV NPM_MAJOR=${NPM_MAJOR} -COPY --from ensure-bins /bin/nanolayer /bin/nanolayer +COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer # # Repositories # RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ From 9b0cc84c9a86874d802c82cf2de7e30dfcc6b20c Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 16:49:25 -0400 Subject: [PATCH 08/32] use noble --- .github/workflows/build-push.yml | 2 +- devcontainer/aws/localstack/Dockerfile | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 720f70b..57ab7db 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -25,7 +25,7 @@ jobs: context: devcontainer/aws/localstack tag: latest args: | - BASE_IMAGE=jammy + BASE_IMAGE=noble - name: aws-localstack context: devcontainer/aws/localstack tag: 3.1.0-node16 diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 3e28fdd..d6118fa 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=jammy +ARG BASE_IMAGE=noble FROM ubuntu:${BASE_IMAGE} as ensure-bins RUN apt-get update && \ @@ -46,13 +46,17 @@ ENV NPM_MAJOR=${NPM_MAJOR} COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer -# # Repositories -# RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ -# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ -# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ -# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ -# curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ -# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list +# Repositories +RUN curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6A755776 | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list + +RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From 20d85902603b5c32b5522f7c940e5e7236fb154d Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:32:04 -0400 Subject: [PATCH 09/32] install docker --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index d6118fa..07ba84a 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -47,7 +47,7 @@ ENV NPM_MAJOR=${NPM_MAJOR} COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer # Repositories -RUN curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x6A755776 | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ +RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ From 0ce75e049ffb2ac121422f5daf89a6d81ed4b1ae Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:34:52 -0400 Subject: [PATCH 10/32] install curl and gpg --- devcontainer/aws/localstack/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 07ba84a..bf4b063 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -46,6 +46,8 @@ ENV NPM_MAJOR=${NPM_MAJOR} COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer +RUN nanolayer install apt "curl gpg" + # Repositories RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ @@ -56,7 +58,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" +# RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From 7e9efcd1c9027adbc137960c8e43842c4c2ba0d4 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:37:03 -0400 Subject: [PATCH 11/32] install ca-certificates --- devcontainer/aws/localstack/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index bf4b063..ca2a1fc 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -46,12 +46,13 @@ ENV NPM_MAJOR=${NPM_MAJOR} COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer -RUN nanolayer install apt "curl gpg" +RUN nanolayer install apt "ca-certificates curl gpg" + +# curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ +# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ # Repositories -RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ From 5f41e8477b1269c266744db9a4e7fead05dcecd1 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:39:53 -0400 Subject: [PATCH 12/32] git rid of sudo command --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index ca2a1fc..a0f0b8f 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -56,7 +56,7 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o / echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list # RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" From 7778e8734459113fb64c8f322b38139daa68106f Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:44:57 -0400 Subject: [PATCH 13/32] (temp) disable flavors and arm64 --- .github/workflows/build-push.yml | 53 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 57ab7db..f5a3c86 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -26,31 +26,31 @@ jobs: tag: latest args: | BASE_IMAGE=noble - - name: aws-localstack - context: devcontainer/aws/localstack - tag: 3.1.0-node16 - args: | - NODE_MAJOR=16 - LOCALSTACK_MAJOR=3 - LOCALSTACK_MINOR=1 - LOCALSTACK_PATCH=0 - NPM_MAJOR=9 - - name: aws-localstack - context: devcontainer/aws/localstack - tag: 3.1.0-node18 - args: | - NODE_MAJOR=18 - LOCALSTACK_MAJOR=3 - LOCALSTACK_MINOR=1 - LOCALSTACK_PATCH=0 - - name: aws-localstack - context: devcontainer/aws/localstack - tag: 3.1.0-node20 - args: | - NODE_MAJOR=20 - LOCALSTACK_MAJOR=3 - LOCALSTACK_MINOR=1 - LOCALSTACK_PATCH=0 + # - name: aws-localstack + # context: devcontainer/aws/localstack + # tag: 3.1.0-node16 + # args: | + # NODE_MAJOR=16 + # LOCALSTACK_MAJOR=3 + # LOCALSTACK_MINOR=1 + # LOCALSTACK_PATCH=0 + # NPM_MAJOR=9 + # - name: aws-localstack + # context: devcontainer/aws/localstack + # tag: 3.1.0-node18 + # args: | + # NODE_MAJOR=18 + # LOCALSTACK_MAJOR=3 + # LOCALSTACK_MINOR=1 + # LOCALSTACK_PATCH=0 + # - name: aws-localstack + # context: devcontainer/aws/localstack + # tag: 3.1.0-node20 + # args: | + # NODE_MAJOR=20 + # LOCALSTACK_MAJOR=3 + # LOCALSTACK_MINOR=1 + # LOCALSTACK_PATCH=0 steps: - name: Checkout uses: actions/checkout@v3 @@ -90,7 +90,8 @@ jobs: file: ${{ matrix.context }}/Dockerfile context: ${{ matrix.context }} build-args: ${{ matrix.args }} - platforms: linux/amd64,linux/arm64 + # platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 pull: true push: true tags: ${{ steps.meta.outputs.tags }} From 025c2b7f212054e5a33ae40da3c1025a237ef82f Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:47:20 -0400 Subject: [PATCH 14/32] install docker engine --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index a0f0b8f..21cedee 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -59,7 +59,7 @@ RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o / curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -# RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" +RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From cdb3d49d0bee6f0e83b1d1c056679254e84f543a Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:53:17 -0400 Subject: [PATCH 15/32] re-add deadsnakes ppa --- devcontainer/aws/localstack/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 21cedee..24eca5b 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -48,11 +48,10 @@ COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer RUN nanolayer install apt "ca-certificates curl gpg" -# curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/trusted.gpg.d/deadsnakes.gpg && \ -# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ - # Repositories -RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ +RUN # curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ From 6aa8905e706e6fec277ec70737d01097145da29f Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:54:58 -0400 Subject: [PATCH 16/32] fix syntax --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 24eca5b..08080e4 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -49,7 +49,7 @@ COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer RUN nanolayer install apt "ca-certificates curl gpg" # Repositories -RUN # curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes.gpg && \ +RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ From e29aebf72450160f409fd69cd3b9ba0a535bb47f Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 17:57:30 -0400 Subject: [PATCH 17/32] lsb-release --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 08080e4..24f1d1e 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -46,7 +46,7 @@ ENV NPM_MAJOR=${NPM_MAJOR} COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer -RUN nanolayer install apt "ca-certificates curl gpg" +RUN nanolayer install apt "ca-certificates curl gpg lsb-release" # Repositories RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes.gpg && \ From e55c6363aa261a7d6a8b31282f4dc6b097eefcad Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:02:15 -0400 Subject: [PATCH 18/32] libsasl and libsnappy --- devcontainer/aws/localstack/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 24f1d1e..e8b6eaa 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -58,7 +58,9 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list +# RUN nanolayer install apt "supervisor dnsutils netcat" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" +RUN nanolayer install apt "libsasl2-dev libsnappy-dev" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From ccad3eb5d2d30937c6bae5ce896715017a2ba6cc Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:06:06 -0400 Subject: [PATCH 19/32] supervisor dnsutils netcat --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index e8b6eaa..e601b7d 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -58,7 +58,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -# RUN nanolayer install apt "supervisor dnsutils netcat" +RUN nanolayer install apt "supervisor dnsutils netcat" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" From 1aa68cbd861bc5cc56ec73ecf9219dd3a5c11de6 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:08:36 -0400 Subject: [PATCH 20/32] fix netcat install --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index e601b7d..3bde87d 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -58,7 +58,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -RUN nanolayer install apt "supervisor dnsutils netcat" +RUN nanolayer install apt "supervisor dnsutils netcat-openbsd" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" From 6eecacc046331b57e5620670975519628746fa0b Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:14:02 -0400 Subject: [PATCH 21/32] install nodejs --- devcontainer/aws/localstack/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 3bde87d..5c26c6f 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -61,6 +61,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C RUN nanolayer install apt "supervisor dnsutils netcat-openbsd" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" +RUN nanolayer install apt "nodejs" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From 4ef921f75b42c3ea8efa0995468f5e9e9c065600 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:20:38 -0400 Subject: [PATCH 22/32] python --- devcontainer/aws/localstack/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 5c26c6f..d1be475 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -62,6 +62,7 @@ RUN nanolayer install apt "supervisor dnsutils netcat-openbsd" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" RUN nanolayer install apt "nodejs" +RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From bd473f4dc0e852abb5e1fba625908dc478592cfb Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:22:35 -0400 Subject: [PATCH 23/32] java --- devcontainer/aws/localstack/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index d1be475..1385d3d 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -63,6 +63,7 @@ RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose- RUN nanolayer install apt "libsasl2-dev libsnappy-dev" RUN nanolayer install apt "nodejs" RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" +RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From 5f17f11d9974eafb15282d0861cb6d1687bde1e3 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:36:16 -0400 Subject: [PATCH 24/32] install ruby --- devcontainer/aws/localstack/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 1385d3d..f9dc249 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -49,8 +49,10 @@ COPY --from=ensure-bins /bin/nanolayer /bin/nanolayer RUN nanolayer install apt "ca-certificates curl gpg lsb-release" # Repositories -RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/deadsnakes.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes.list && \ +RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6CF475977595C89F51BA6932366A755776" | gpg --dearmor -o /etc/apt/keyrings/deadsnakes-ppa.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/deadsnakes-ppa.gpg] http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/deadsnakes-ppa.list && \ + curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9AB211A0296344E1A83AEFF0A579DF7F2B1186ED" | gpg --dearmor -o /etc/apt/keyrings/instructure-ruby.gpg && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/instructure-ruby.gpg] http://ppa.launchpad.net/instructure/ruby/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/instructure-ruby.list && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ @@ -64,6 +66,7 @@ RUN nanolayer install apt "libsasl2-dev libsnappy-dev" RUN nanolayer install apt "nodejs" RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" +RUN nanolayer install apt "ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev" # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From 940634d115fcac22f324d72f91bbae0cbb2739c1 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:43:16 -0400 Subject: [PATCH 25/32] back to jammy --- .github/workflows/build-push.yml | 2 +- devcontainer/aws/localstack/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index f5a3c86..18d37f9 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -25,7 +25,7 @@ jobs: context: devcontainer/aws/localstack tag: latest args: | - BASE_IMAGE=noble + BASE_IMAGE=jammy # - name: aws-localstack # context: devcontainer/aws/localstack # tag: 3.1.0-node16 diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index f9dc249..fd118ed 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=noble +ARG BASE_IMAGE=jammy FROM ubuntu:${BASE_IMAGE} as ensure-bins RUN apt-get update && \ @@ -54,7 +54,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9AB211A0296344E1A83AEFF0A579DF7F2B1186ED" | gpg --dearmor -o /etc/apt/keyrings/instructure-ruby.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/instructure-ruby.gpg] http://ppa.launchpad.net/instructure/ruby/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/instructure-ruby.list && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ From cc4cd4124948d9d7c09f8d4eb9955b6ae076fcfe Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:45:50 -0400 Subject: [PATCH 26/32] use lsb_release for docker --- devcontainer/aws/localstack/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index fd118ed..c5580c9 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -54,7 +54,7 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x9AB211A0296344E1A83AEFF0A579DF7F2B1186ED" | gpg --dearmor -o /etc/apt/keyrings/instructure-ruby.gpg && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/instructure-ruby.gpg] http://ppa.launchpad.net/instructure/ruby/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/instructure-ruby.list && \ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" > /etc/apt/sources.list.d/docker.list && \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ From d7aed5518ed2a93a940f3ebcb9f80f6d9338d258 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 18:58:03 -0400 Subject: [PATCH 27/32] install pip --- devcontainer/aws/localstack/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index c5580c9..11fc148 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -60,11 +60,11 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -RUN nanolayer install apt "supervisor dnsutils netcat-openbsd" +RUN nanolayer install apt "gh supervisor dnsutils netcat-openbsd" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" RUN nanolayer install apt "nodejs" -RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" +RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv python${PYTHON_MAJOR}.${PYTHON_MINOR}-pip" RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" RUN nanolayer install apt "ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev" From 6674d2bb4931a66b20c47b9752a30758f6e9dfec Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 19:01:42 -0400 Subject: [PATCH 28/32] install pip from bootstrap --- devcontainer/aws/localstack/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 11fc148..2a53d63 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -64,9 +64,10 @@ RUN nanolayer install apt "gh supervisor dnsutils netcat-openbsd" RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" RUN nanolayer install apt "libsasl2-dev libsnappy-dev" RUN nanolayer install apt "nodejs" -RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv python${PYTHON_MAJOR}.${PYTHON_MINOR}-pip" +RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" RUN nanolayer install apt "ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev" +RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From ca9ef6a964d0602b28102a09de922ed9a5a0f33a Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 19:26:30 -0400 Subject: [PATCH 29/32] setup default python --- devcontainer/aws/localstack/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 2a53d63..381debc 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -60,14 +60,22 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list +# Dev Tools RUN nanolayer install apt "gh supervisor dnsutils netcat-openbsd" +# Docker RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" +# Dev Bindings RUN nanolayer install apt "libsasl2-dev libsnappy-dev" +# Node RUN nanolayer install apt "nodejs" -RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" +# Python +RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" && \ + update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_MAJOR}.${PYTHON_MINOR} 1 && \ + curl -fsSL https://bootstrap.pypa.io/get-pip.py | python +# Java RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" +# Ruby RUN nanolayer install apt "ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev" -RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ From db207cc8a0b146d7c1d91d762b678ab27c3b6cbb Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 19:39:22 -0400 Subject: [PATCH 30/32] node tooling --- devcontainer/aws/localstack/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index 381debc..b75a366 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -61,13 +61,15 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list # Dev Tools -RUN nanolayer install apt "gh supervisor dnsutils netcat-openbsd" +RUN nanolayer install apt "gh dnsutils netcat-openbsd" # Docker RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" # Dev Bindings RUN nanolayer install apt "libsasl2-dev libsnappy-dev" # Node -RUN nanolayer install apt "nodejs" +RUN nanolayer install apt "nodejs" && \ + npm install --only=production --global npm@${NPM_MAJOR} yarn nx pnpm && \ + npm cache clean --force # Python RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" && \ update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_MAJOR}.${PYTHON_MINOR} 1 && \ From 1a9dd410d4248b4ba944061be125fb89e65db824 Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 19:47:23 -0400 Subject: [PATCH 31/32] gcc/g++ --- devcontainer/aws/localstack/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index b75a366..f38bbaf 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -60,12 +60,14 @@ RUN curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xF23C5A6C curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list -# Dev Tools -RUN nanolayer install apt "gh dnsutils netcat-openbsd" +# Generic Tools +RUN nanolayer install apt "gh dnsutils netcat-openbsd make" # Docker RUN nanolayer install apt "docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin" # Dev Bindings RUN nanolayer install apt "libsasl2-dev libsnappy-dev" +# C/C++ +RUN nanolayer install apt "gcc g++" # Node RUN nanolayer install apt "nodejs" && \ npm install --only=production --global npm@${NPM_MAJOR} yarn nx pnpm && \ From cff5b0f46e84d6fb3d62e07ca4e1d8ccbd2e6dfe Mon Sep 17 00:00:00 2001 From: Christian Nuss Date: Sat, 1 Jun 2024 19:57:17 -0400 Subject: [PATCH 32/32] pipx and supervisor --- devcontainer/aws/localstack/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devcontainer/aws/localstack/Dockerfile b/devcontainer/aws/localstack/Dockerfile index f38bbaf..1467050 100644 --- a/devcontainer/aws/localstack/Dockerfile +++ b/devcontainer/aws/localstack/Dockerfile @@ -75,12 +75,17 @@ RUN nanolayer install apt "nodejs" && \ # Python RUN nanolayer install apt "python${PYTHON_MAJOR}.${PYTHON_MINOR} python${PYTHON_MAJOR}.${PYTHON_MINOR}-dev python${PYTHON_MAJOR}.${PYTHON_MINOR}-venv" && \ update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_MAJOR}.${PYTHON_MINOR} 1 && \ - curl -fsSL https://bootstrap.pypa.io/get-pip.py | python + curl -fsSL https://bootstrap.pypa.io/get-pip.py | python && \ + pip install --no-cache-dir pipx supervisor supervisor_checks amazon-kclpy +ENV PATH="/root/.local/bin:${PATH}" # Java RUN nanolayer install apt "openjdk-${JAVA_MAJOR}-jdk openjdk-${JAVA_MAJOR}-jre" # Ruby RUN nanolayer install apt "ruby${RUBY_MAJOR}.${RUBY_MINOR} ruby${RUBY_MAJOR}.${RUBY_MINOR}-dev" +# Localstack / AWS + + # # Nvidia Repository (Ref: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) # RUN curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ # && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \