Files
psf-memo-indexer/production/docker/memo-client/Dockerfile
T

45 lines
1.2 KiB
Docker
Raw Normal View History

2026-07-15 09:29:14 -07:00
# Create a Dockerized front-end SPA served by nginx
#
#IMAGE BUILD COMMANDS
2026-07-15 09:58:51 -07:00
FROM ubuntu:24.04 as builder
2026-07-15 09:29:14 -07:00
MAINTAINER Chris Troutner <chris.troutner@gmail.com>
#Update the OS and install any OS packages needed.
RUN apt-get update
RUN apt-get install -y sudo git curl nano gnupg wget
#Install Node and NPM
2026-07-15 09:58:51 -07:00
RUN curl -sL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
2026-07-15 09:29:14 -07:00
RUN bash nodesource_setup.sh
RUN apt-get install -y nodejs build-essential
#Set the working directory to be the home directory
WORKDIR /home/safeuser
# Clone the psf-memo-client repository
RUN git clone https://github.com/Permissionless-Software-Foundation/psf-memo-client
# Switch to the desired branch. `master` is usually stable,
# and `stage` / `unstable` have the most up-to-date changes.
WORKDIR /home/safeuser/psf-memo-client
# For development: switch to unstable branch
#RUN git checkout unstable
# Install dependencies
RUN npm install
# Build the site
RUN npm run build
# Load the NGINX image.
FROM nginx
EXPOSE 80
# Copy the files built in the first container to the new NGINX container.
COPY --from=builder /home/safeuser/psf-memo-client/build /usr/share/nginx/html
# Copy the NGINX configuration file.
COPY default.conf /etc/nginx/conf.d/default.conf