-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
47 lines (36 loc) · 1.18 KB
/
Dockerfile.dev
File metadata and controls
47 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Development Dockerfile for Cpplify
# Optimized for local development with volume mounts and hot reload
FROM continuumio/miniconda3
# Install System Dependencies
RUN apt-get update && apt-get install -y \
wget \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install Go (latest stable)
ENV GO_VERSION=1.21.6
RUN ARCH=$(dpkg --print-architecture) && \
wget https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-${ARCH}.tar.gz && \
rm go${GO_VERSION}.linux-${ARCH}.tar.gz
ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin
# Install air for Go hot reload
RUN go install github.com/air-verse/air@latest
# Install Cling via Conda
RUN conda install -y -c conda-forge cling && \
conda clean -afy
# Set Workdir
WORKDIR /app
# Set LD_LIBRARY_PATH so Cling finds its libs at runtime
ENV LD_LIBRARY_PATH=/opt/conda/lib
# Copy source code
COPY backend ./backend
COPY kernel ./kernel
# Runtime Configuration
ENV PORT=8080
ENV KERNEL_PATH="python3 /app/kernel/kernel_wrapper.py"
ENV CLING_PATH=/opt/conda/bin/cling
# Expose port
EXPOSE 8080
# Keep container running - source code mounted via volumes
CMD ["tail", "-f", "/dev/null"]