Multiple implementations of the same back-end application. The aim is to provide quick, side-by-side comparisons of different technologies (languages, frameworks, libraries) while preserving consistent business logic across all implementations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
910 B

FROM node:24.0.1-alpine
WORKDIR /usr/src/app
# Install system dependencies
RUN apk add --no-cache \
git \
bash \
curl \
sudo
# Give sudo permissions to the developer user
RUN echo '%developer ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer
# Configure user permissions
ARG USER_ID=1000
ARG GROUP_ID=1000
# Create a user with matching UID/GID
RUN if ! getent group $GROUP_ID > /dev/null 2>&1; then \
addgroup -g $GROUP_ID developer; \
else \
addgroup developer; \
fi && \
if ! getent passwd $USER_ID > /dev/null 2>&1; then \
adduser -D -u $USER_ID -G developer -s /bin/sh developer; \
else \
adduser -D -G developer -s /bin/sh developer; \
fi
RUN chown -R $USER_ID:$GROUP_ID /usr/src/app
USER $USER_ID:$GROUP_ID
# Expose port 3000 for NestJS
EXPOSE 3000
CMD ["npm", "run", "start:dev"]