Skip to content

Commit 4a0c841

Browse files
committed
First commit
0 parents  commit 4a0c841

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed

.dockerignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Git
2+
.git
3+
.gitignore
4+
5+
# Documentation
6+
*.md
7+
README.md
8+
9+
# Scripts (not needed in image)
10+
build-and-push.sh
11+
12+
# macOS
13+
.DS_Store
14+
15+
# Environment files
16+
.env
17+
.env.local
18+
19+
# IDE
20+
.vscode/
21+
.idea/
22+
23+
# Logs
24+
*.log

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Environment variables
5+
.env
6+
.env.local
7+
8+
# IDE
9+
.vscode/
10+
.idea/
11+
*.swp
12+
*.swo
13+
14+
# Logs
15+
*.log

Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ARG BASE_VERSION=latest
2+
FROM mcp/elasticsearch:${BASE_VERSION}
3+
4+
# Add bash, curl, python3, and nodejs for compatibility with mintmcp/auth-env and npx
5+
RUN apk add --no-cache bash curl python3 nodejs npm
6+
7+
# Keep the original entrypoint
8+
ENTRYPOINT ["/usr/local/bin/elasticsearch-core-mcp-server"]

build-and-push.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
set -e # Exit on error
3+
4+
IMAGE_NAME="mintmcp/elasticsearch"
5+
6+
# Get version from command line argument
7+
VERSION=$1
8+
9+
# Require a version argument
10+
if [ -z "$VERSION" ]; then
11+
echo "Error: Version argument required"
12+
echo "Usage: ./build-and-push.sh <version>"
13+
echo "Examples:"
14+
echo " ./build-and-push.sh latest"
15+
exit 1
16+
fi
17+
18+
echo "Using base image: mcp/elasticsearch:${VERSION}"
19+
20+
# Build with VERSION argument
21+
docker build --platform linux/amd64 \
22+
--build-arg BASE_VERSION=${VERSION} \
23+
-t ${IMAGE_NAME}:${VERSION} .
24+
25+
# Push the version
26+
docker push ${IMAGE_NAME}:${VERSION}
27+
28+
# Get and display the image SHA
29+
IMAGE_SHA=$(docker inspect --format='{{index .RepoDigests 0}}' ${IMAGE_NAME}:${VERSION})
30+
echo "Image SHA: ${IMAGE_SHA}"

0 commit comments

Comments
 (0)