forked from vercel-labs/workflow-builder-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.devspace
More file actions
62 lines (53 loc) · 1.65 KB
/
Dockerfile.devspace
File metadata and controls
62 lines (53 loc) · 1.65 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
55
56
57
58
59
60
61
62
# DevSpace Development Container
# Full-featured development environment with all build tools
# Runs as non-root user (UID 1000) to allow Dapr sidecar coexistence
#
# Based on Node.js with additional development dependencies
FROM node:22-bookworm
# Install system dependencies for development and Claude Code tools
RUN apt-get update && apt-get install -y \
# Version control
git \
openssh-client \
gnupg \
# Claude Code tools (Grep, file search, web fetch)
ripgrep \
fd-find \
curl \
wget \
jq \
# Shell utilities
bash-completion \
less \
tree \
vim-tiny \
# Process management
screen \
procps \
# Certificates for HTTPS
ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
# Create symlinks for common tool names
&& ln -sf /usr/bin/fdfind /usr/bin/fd
# The node:22 image already has user 'node' with UID 1000
# Create and configure /app directory with proper ownership
# Also create /.devspace for devspace restart helper signal file
RUN mkdir -p /app && \
chown -R node:node /app && \
mkdir -p /.devspace && \
chown -R node:node /.devspace
# Enable corepack for pnpm (runs as root for system-wide setup)
RUN corepack enable && \
corepack prepare pnpm@9.12.3 --activate
# Ensure npm/node directories are accessible
RUN mkdir -p /home/node/.npm && \
chown -R node:node /home/node/.npm
WORKDIR /app
# Switch to non-root 'node' user (UID 1000)
USER node
# Set environment for development
ENV NODE_ENV=development
ENV NEXT_TELEMETRY_DISABLED=1
# The actual source code is mounted via devspace sync
# CMD is overridden by devspace.yaml command
CMD ["tail", "-f", "/dev/null"]