Use aws-cli APK instead.
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -2,13 +2,6 @@
|
|||||||
# Build stage for libraries
|
# Build stage for libraries
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
# Install build dependencies including AWS CLI v2
|
|
||||||
RUN apk add --no-cache bash wget curl unzip gcompat
|
|
||||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
|
||||||
unzip awscliv2.zip && \
|
|
||||||
./aws/install && \
|
|
||||||
rm -rf awscliv2.zip aws/
|
|
||||||
|
|
||||||
# Node.js application build stage
|
# Node.js application build stage
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -26,14 +19,10 @@ RUN echo "https://dl-cdn.alpinelinux.org/alpine/v$(grep -oE '[0-9]+\.[0-9]+' /et
|
|||||||
RUN apk update
|
RUN apk update
|
||||||
|
|
||||||
# Install runtime dependencies including AWS CLI v2
|
# Install runtime dependencies including AWS CLI v2
|
||||||
RUN apk add --no-cache bash redis ghostscript graphicsmagick imagemagick libjpeg-turbo libpng libwebp tiff libheif libde265 x265 ffmpeg curl unzip gcompat tzdata
|
RUN apk add --no-cache bash redis ghostscript graphicsmagick imagemagick libjpeg-turbo libpng libwebp tiff libheif libde265 x265 ffmpeg curl tzdata aws-cli
|
||||||
|
|
||||||
# # Install AWS CLI v2
|
# Verify AWS CLI installation
|
||||||
# RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
RUN aws --version
|
||||||
# unzip awscliv2.zip && \
|
|
||||||
# ./aws/install && \
|
|
||||||
# rm -rf awscliv2.zip aws/ && \
|
|
||||||
# aws --version
|
|
||||||
|
|
||||||
RUN npm install -g pm2
|
RUN npm install -g pm2
|
||||||
|
|
||||||
@@ -53,4 +42,6 @@ COPY --from=builder /usr/src/app/ecosystem.config.cjs ./ecosystem.config.cjs
|
|||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
|
## Only the below line differs.
|
||||||
CMD ["sh", "-c", "redis-server --daemonize yes && pm2-runtime ecosystem.config.cjs"]
|
CMD ["sh", "-c", "redis-server --daemonize yes && pm2-runtime ecosystem.config.cjs"]
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
# Build stage for libraries
|
# Build stage for libraries
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
# Install build dependencies including AWS CLI v2
|
|
||||||
RUN apk add --no-cache bash wget curl unzip gcompat
|
|
||||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
|
||||||
unzip awscliv2.zip && \
|
|
||||||
./aws/install && \
|
|
||||||
rm -rf awscliv2.zip aws/
|
|
||||||
|
|
||||||
# Node.js application build stage
|
# Node.js application build stage
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -26,14 +19,10 @@ RUN echo "https://dl-cdn.alpinelinux.org/alpine/v$(grep -oE '[0-9]+\.[0-9]+' /et
|
|||||||
RUN apk update
|
RUN apk update
|
||||||
|
|
||||||
# Install runtime dependencies including AWS CLI v2
|
# Install runtime dependencies including AWS CLI v2
|
||||||
RUN apk add --no-cache bash redis ghostscript graphicsmagick imagemagick libjpeg-turbo libpng libwebp tiff libheif libde265 x265 ffmpeg curl unzip gcompat tzdata
|
RUN apk add --no-cache bash redis ghostscript graphicsmagick imagemagick libjpeg-turbo libpng libwebp tiff libheif libde265 x265 ffmpeg curl tzdata aws-cli
|
||||||
|
|
||||||
# Install AWS CLI v2
|
# Verify AWS CLI installation
|
||||||
# RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
|
RUN aws --version
|
||||||
# unzip awscliv2.zip && \
|
|
||||||
# ./aws/install && \
|
|
||||||
# rm -rf awscliv2.zip aws/ && \
|
|
||||||
# aws --version
|
|
||||||
|
|
||||||
RUN npm install -g pm2
|
RUN npm install -g pm2
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
|
|||||||
Reference in New Issue
Block a user