try new dockerfile

This commit is contained in:
Dobromir Popov
2024-07-19 00:52:11 +03:00
parent a5bbf01802
commit 77e3438a2a

View File

@ -0,0 +1,19 @@
FROM node:current-alpine
# Install git and curl
RUN apk add --no-cache git curl
# Set environment variables for repo and branch
# These will be overridden by docker-compose.yml
ENV REPO=""
ENV BRANCH=""
# Create a directory for the app
WORKDIR /app
# Download the entrypoint script
CMD git clone --depth 1 --branch $BRANCH $REPO /tmp/repo && \
cp /tmp/repo/_deploy/entrypoint.sh /app/entrypoint.sh && \
chmod +x /app/entrypoint.sh && \
rm -rf /tmp/repo && \
/app/entrypoint.sh