From 77e3438a2a42be57ef5313e211ef859bb6546e32 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Fri, 19 Jul 2024 00:52:11 +0300 Subject: [PATCH] try new dockerfile --- _deploy/new-lite/Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 _deploy/new-lite/Dockerfile diff --git a/_deploy/new-lite/Dockerfile b/_deploy/new-lite/Dockerfile new file mode 100644 index 0000000..811d9b1 --- /dev/null +++ b/_deploy/new-lite/Dockerfile @@ -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 \ No newline at end of file