forked from nahmanmate/postgresql-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 874 Bytes
/
Dockerfile
File metadata and controls
35 lines (26 loc) · 874 Bytes
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
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
FROM node:lts-alpine
WORKDIR /app
# Copy package files and install dependencies
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
# Copy TypeScript configuration
COPY tsconfig.json ./
# Copy all source files
COPY . .
# Build the TypeScript source
RUN npm run build
# Copy and set up entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs
RUN adduser -S postgres-mcp -u 1001
# Change ownership of the app directory
RUN chown -R postgres-mcp:nodejs /app
USER postgres-mcp
# Expose any necessary ports if needed (optional)
# EXPOSE 3000
# Use entrypoint script for flexible configuration
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD []