Compare commits
1 Commits
chore/ubun
...
fix-mcp-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be8d914bb6 |
@@ -20,10 +20,10 @@ COPY . .
|
|||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o mcpbox ./cmd/mcpbox
|
RUN CGO_ENABLED=0 GOOS=linux go build -o mcpbox ./cmd/mcpbox
|
||||||
|
|
||||||
# Final stage
|
# Final stage
|
||||||
FROM ubuntu:22.04
|
FROM alpine:3.19
|
||||||
|
|
||||||
# Install runtime dependencies
|
# Install runtime dependencies
|
||||||
RUN apt-get update && apt-get install -y ca-certificates tzdata docker.io bash
|
RUN apk add --no-cache ca-certificates tzdata docker
|
||||||
|
|
||||||
# Create non-root user
|
# Create non-root user
|
||||||
#RUN adduser -D -g '' appuser
|
#RUN adduser -D -g '' appuser
|
||||||
|
|||||||
@@ -30,15 +30,9 @@ func NewDiscord(config map[string]string) *Discord {
|
|||||||
duration = 5 * time.Minute
|
duration = 5 * time.Minute
|
||||||
}
|
}
|
||||||
|
|
||||||
token := config["token"]
|
|
||||||
|
|
||||||
if !strings.HasPrefix(token, "Bot ") {
|
|
||||||
token = "Bot " + token
|
|
||||||
}
|
|
||||||
|
|
||||||
return &Discord{
|
return &Discord{
|
||||||
conversationTracker: NewConversationTracker[string](duration),
|
conversationTracker: NewConversationTracker[string](duration),
|
||||||
token: token,
|
token: config["token"],
|
||||||
defaultChannel: config["defaultChannel"],
|
defaultChannel: config["defaultChannel"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user