# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use the official Go image as a build environment
FROM golang:1.23.4-alpine3.21 AS builder
# Install necessary packages
RUN apk add --no-cache bash git make
# Set the working directory
WORKDIR /app
# Copy the source code into the container
COPY . .
# Build the application using the build script
RUN ./build.sh --release
# Use a Docker in Docker image for running the application
FROM docker:24-dind
# Set the working directory
WORKDIR /app
# Copy the built binary from the builder stage
COPY --from=builder /app/bin/code-sandbox-mcp /usr/local/bin/
# Expose any ports the application needs
EXPOSE 9520
# Run the application
ENTRYPOINT ["/bin/bash", "code-sandbox-mcp"]