forked from coder/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.custom
More file actions
54 lines (40 loc) · 1.14 KB
/
Dockerfile.custom
File metadata and controls
54 lines (40 loc) · 1.14 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
48
49
50
51
52
53
54
# Custom Code-Server Dockerfile with QBraid branding
FROM node:20-bullseye as builder
# Install build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
git-lfs \
python3 \
quilt \
jq \
rsync \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /src
# Copy source code
COPY . .
# Initialize git submodules
RUN git submodule update --init
# Apply patches
RUN quilt push -a || true
# Install dependencies and build
RUN npm install && \
npm run build && \
VERSION=0.0.0 npm run build:vscode && \
npm run release
# Build packages
RUN npm run package
# Production stage
FROM codercom/code-server:latest
# Switch to root to install packages
USER root
# Copy our custom build
COPY --from=builder /src/release-packages/*.deb /tmp/
# Install our custom build
RUN dpkg -i /tmp/*.deb || apt-get update && apt-get install -f -y
# Copy custom favicon files (we'll add these in the next step)
# COPY logo-square.png /opt/code-server/lib/vscode/src/vs/workbench/browser/media/favicon.png
USER 1000
EXPOSE 8080
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]