diff --git a/Dockerfiles/Dockerfile.agent-provisioning b/Dockerfiles/Dockerfile.agent-provisioning index 8d1eb9d21..7ac849872 100644 --- a/Dockerfiles/Dockerfile.agent-provisioning +++ b/Dockerfiles/Dockerfile.agent-provisioning @@ -1,12 +1,10 @@ # Stage 1: Build the application FROM node:18-alpine as build # RUN npm install -g pnpm -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot - - +# Install AWS CLI +# RUN apk update +# RUN apk add openssh-client +# RUN apk update # RUN apk add aws-cli RUN set -eux \ && apk --no-cache add \ @@ -33,7 +31,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -47,10 +45,10 @@ RUN pnpm run build agent-provisioning # Stage 2: Create the final image FROM node:18-alpine as prod -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot +# Install AWS CLI +# RUN apk update +# RUN apk add openssh-client +# RUN apk update # RUN apk add aws-cli RUN set -eux \ && apk --no-cache add \ diff --git a/Dockerfiles/Dockerfile.agent-service b/Dockerfiles/Dockerfile.agent-service index 288112c33..ea11b2093 100644 --- a/Dockerfiles/Dockerfile.agent-service +++ b/Dockerfiles/Dockerfile.agent-service @@ -16,7 +16,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -52,4 +52,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t agent-service -f Dockerfiles/Dockerfile.agent-service . # docker run -d --env-file .env --name agent-service docker.io/library/agent-service -# docker logs -f agent-service +# docker logs -f agent-service \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.api-gateway b/Dockerfiles/Dockerfile.api-gateway index 50386052d..15fc4731d 100644 --- a/Dockerfiles/Dockerfile.api-gateway +++ b/Dockerfiles/Dockerfile.api-gateway @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ # COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build api-gateway # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -41,4 +33,4 @@ COPY --from=build /app/node_modules ./node_modules # COPY --from=build /app/uploadedFiles ./uploadedFiles # Set the command to run the microservice -CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] +CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx prisma generate && cd ../.. && node dist/apps/api-gateway/main.js"] \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.connection b/Dockerfiles/Dockerfile.connection index 1054e2629..4b7f36a45 100644 --- a/Dockerfiles/Dockerfile.connection +++ b/Dockerfiles/Dockerfile.connection @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ #COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build connection # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -48,4 +40,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t connection -f Dockerfiles/Dockerfile.connection . # docker run -d --env-file .env --name connection docker.io/library/connection -# docker logs -f connection +# docker logs -f connection \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ecosystem b/Dockerfiles/Dockerfile.ecosystem index 2049362a9..cad8759c2 100644 --- a/Dockerfiles/Dockerfile.ecosystem +++ b/Dockerfiles/Dockerfile.ecosystem @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ #COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build ecosystem # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -46,4 +38,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t ecosystem -f Dockerfiles/Dockerfile.ecosystem . # docker run -d --env-file .env --name ecosystem docker.io/library/ecosystem -# docker logs -f ecosystem +# docker logs -f ecosystem \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.issuance b/Dockerfiles/Dockerfile.issuance index e9cad5d5f..0dbcd2a0c 100644 --- a/Dockerfiles/Dockerfile.issuance +++ b/Dockerfiles/Dockerfile.issuance @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ #COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build issuance # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -47,4 +39,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t issuance -f Dockerfiles/Dockerfile.issuance . # docker run -d --env-file .env --name issuance docker.io/library/issuance -# docker logs -f issuance +# docker logs -f issuance \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.ledger b/Dockerfiles/Dockerfile.ledger index 5fe9ae14c..e15764855 100644 --- a/Dockerfiles/Dockerfile.ledger +++ b/Dockerfiles/Dockerfile.ledger @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ #COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -25,11 +21,7 @@ RUN npm run build ledger # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -46,4 +38,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t ledger -f Dockerfiles/Dockerfile.ledger . # docker run -d --env-file .env --name ledger docker.io/library/ledger -# docker logs -f ledger +# docker logs -f ledger \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.notification b/Dockerfiles/Dockerfile.notification index eb7c78963..07a497a1a 100644 --- a/Dockerfiles/Dockerfile.notification +++ b/Dockerfiles/Dockerfile.notification @@ -38,4 +38,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t notification -f Dockerfiles/Dockerfile.notification . # docker run -d --env-file .env --name notification docker.io/library/notification -# docker logs -f notification +# docker logs -f notification \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.organization b/Dockerfiles/Dockerfile.organization index 1e124dd1a..0503546bb 100644 --- a/Dockerfiles/Dockerfile.organization +++ b/Dockerfiles/Dockerfile.organization @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -12,7 +8,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build organization # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -45,4 +37,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t organization -f Dockerfiles/Dockerfile.organization . # docker run -d --env-file .env --name issuance docker.io/library/organization -# docker logs -f organization +# docker logs -f organization \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.user b/Dockerfiles/Dockerfile.user index 07ac91bb0..6260e2b08 100644 --- a/Dockerfiles/Dockerfile.user +++ b/Dockerfiles/Dockerfile.user @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-slim as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true @@ -14,7 +10,7 @@ ENV PUPPETEER_SKIP_DOWNLOAD true # Note: this installs the necessary libs to make the browser work with Puppeteer. RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ - sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ + sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ apt-get update && \ apt-get install google-chrome-stable -y --no-install-recommends && \ rm -rf /var/lib/apt/lists/* @@ -27,7 +23,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm install # Copy the rest of the application code COPY . . @@ -39,12 +35,6 @@ RUN pnpm run build user # Stage 2: Create the final image FROM node:18-slim -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot - -RUN npm install --ignore-scripts -g pnpm # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true ENV PUPPETEER_SKIP_DOWNLOAD true @@ -53,14 +43,14 @@ ENV PUPPETEER_SKIP_DOWNLOAD true # Note: this installs the necessary libs to make the browser work with Puppeteer. RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ - sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ + sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ apt-get update && \ apt-get install google-chrome-stable -y --no-install-recommends && \ rm -rf /var/lib/apt/lists/* # Set the working directory WORKDIR /app - +RUN npm install -g pnpm # Copy the compiled code from the build stage COPY --from=build /app/dist/apps/user/ ./dist/apps/user/ @@ -76,4 +66,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t user -f Dockerfiles/Dockerfile.user . # docker run -d --env-file .env --name user docker.io/library/user -# docker logs -f user +# docker logs -f user \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.utility b/Dockerfiles/Dockerfile.utility index f7311b057..4965deef4 100644 --- a/Dockerfiles/Dockerfile.utility +++ b/Dockerfiles/Dockerfile.utility @@ -1,11 +1,7 @@ # Stage 1: Build the application FROM node:18-slim as build +RUN npm install -g pnpm -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true @@ -26,7 +22,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm install # Copy the rest of the application code COPY . . @@ -37,12 +33,7 @@ RUN pnpm run build utility # Stage 2: Create the final image FROM node:18-slim -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm # We don't need the standalone Chromium ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true @@ -50,13 +41,14 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true # Note: this installs the necessary libs to make the browser work with Puppeteer. RUN apt-get update && apt-get install gnupg wget -y && \ wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \ - sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ + sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \ apt-get update && \ apt-get install google-chrome-stable -y --no-install-recommends && \ rm -rf /var/lib/apt/lists/* # Set the working directory WORKDIR /app +RUN npm install -g pnpm # Copy the compiled code from the build stage COPY --from=build /app/dist/apps/utility/ ./dist/apps/utility/ diff --git a/Dockerfiles/Dockerfile.verification b/Dockerfiles/Dockerfile.verification index 8ac58be62..977765229 100644 --- a/Dockerfiles/Dockerfile.verification +++ b/Dockerfiles/Dockerfile.verification @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -12,7 +8,7 @@ WORKDIR /app COPY package.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -23,11 +19,7 @@ RUN npm run build verification # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -44,4 +36,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t verification -f Dockerfiles/Dockerfile.verification . # docker run -d --env-file .env --name verification docker.io/library/verification -# docker logs -f verification +# docker logs -f verification \ No newline at end of file diff --git a/Dockerfiles/Dockerfile.webhook b/Dockerfiles/Dockerfile.webhook index 090bfc8b3..da9b74e07 100644 --- a/Dockerfiles/Dockerfile.webhook +++ b/Dockerfiles/Dockerfile.webhook @@ -1,10 +1,6 @@ # Stage 1: Build the application FROM node:18-alpine as build -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -13,7 +9,7 @@ COPY package.json ./ #COPY package-lock.json ./ # Install dependencies -RUN pnpm i --ignore-scripts +RUN pnpm i # Copy the rest of the application code COPY . . @@ -24,11 +20,7 @@ RUN pnpm run build webhook # Stage 2: Create the final image FROM node:18-alpine -RUN addgroup -S nonroot \ - && adduser -S nonroot -G nonroot - -USER nonroot -RUN npm install --ignore-scripts -g pnpm +RUN npm install -g pnpm # Set the working directory WORKDIR /app @@ -47,4 +39,4 @@ CMD ["sh", "-c", "cd libs/prisma-service && npx prisma migrate deploy && npx pri # docker build -t webhook -f Dockerfiles/Dockerfile.webhook . # docker run -d --env-file .env --name webhook docker.io/library/webhook -# docker logs -f webhook +# docker logs -f webhook \ No newline at end of file