-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (39 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
48 lines (39 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Dockerfile
# https://docs.aws.amazon.com/linux/al2023/ug/base-container.html
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
# Install MariaDB and Bash so we can run data-migrations/process.sh
# Also some system utilities for testing
RUN rm -fr /var/cache/dnf/* && dnf clean all && dnf -y update && dnf -y install \
net-tools \
wget \
tar \
unzip \
man \
vim \
procps-ng \
awscli \
findutils \
mariadb-connector-c \
mariadb1011 \
nodejs22 \
&& dnf clean all
# Create the directory on the node image
# where our Next.js app will live
RUN mkdir -p /app
# Set /app as the working directory in container
WORKDIR /app
# Install awslocal so we can build AWS resources in localstack
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir awscli-local
# Copy package.json and package-lock.json
# to the /app working directory
COPY package*.json tsconfig.json codegen.ts .env ./
# Install dependencies in /app
RUN npm ci
# Copy the rest of our Apollo Server folder into /app
COPY . .
# Ensure port 3000 is accessible to our system
EXPOSE 4000
# Command to run the Next.js app in development mode
CMD ["npm", "run", "dev"]