Skip to content

Commit bcdf8f9

Browse files
rollback to original dockerfile
1 parent f61419b commit bcdf8f9

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

Dockerfile

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,40 @@
1-
FROM python:3.12-slim-bookworm
1+
# Set the build mode (default to remote)
2+
ARG BUILD_MODE=remote
3+
FROM python:3.12.3-bookworm
24

3-
# Install required system dependencies
4-
RUN apt-get update && apt-get install -y --no-install-recommends \
5-
git \
6-
gcc \
5+
ARG BUILD_MODE
6+
ENV BUILD_MODE=${BUILD_MODE}
7+
8+
# Install required tools
9+
RUN apt-get update && apt-get install -y \
10+
build-essential \
711
curl \
8-
libpq-dev \
9-
python3-distutils \
10-
&& apt-get clean \
12+
git \
13+
python3-pip \
14+
software-properties-common \
1115
&& rm -rf /var/lib/apt/lists/*
1216

13-
ARG BUILD_MODE=remote
14-
ENV BUILD_MODE=${BUILD_MODE}
15-
ENV PORT=8501
16-
17-
# Use neutral temp folder for staging
17+
# Set the workdir to a neutral temp folder first
1818
WORKDIR /tmp/build-context
1919

20-
# Remote clone from GitHub
20+
# Clone OR copy conditionally
2121
RUN if [ "$BUILD_MODE" = "remote" ]; then \
2222
git clone https://github.com/curiouslearning/cl-dashboard-internal.git /cl-dashboard-internal ; \
2323
fi
2424

25-
# Optional: local copy
25+
# Copy only if local
2626
COPY . /tmp/local-copy
2727
RUN if [ "$BUILD_MODE" = "local" ]; then \
2828
cp -r /tmp/local-copy /cl-dashboard-internal ; \
2929
fi
3030

31-
# Cleanup temp build folders
32-
RUN rm -rf /tmp/local-copy /tmp/build-context /tmp/remote-copy || true
33-
34-
# Move into app and install requirements
3531
WORKDIR /cl-dashboard-internal
36-
RUN pip install --no-cache-dir -r requirements.txt
3732

38-
# Entrypoint
33+
RUN pip3 install --no-cache-dir -r requirements.txt
34+
35+
ENV PORT=8501
36+
3937
COPY entrypoint.sh /entrypoint.sh
4038
RUN chmod +x /entrypoint.sh
4139

42-
ENTRYPOINT ["/entrypoint.sh"]
40+
ENTRYPOINT ["/entrypoint.sh"]

0 commit comments

Comments
 (0)