ruby version

This commit is contained in:
2026-04-28 22:58:37 +02:00
parent 6f6dcd062f
commit 4ac5f1632f
12 changed files with 462 additions and 37 deletions

View File

@@ -1,31 +1,17 @@
# Build stage
FROM golang:1.26.1-alpine AS builder
FROM ruby:3.3-alpine
RUN apk add --no-cache git build-base
WORKDIR /app
# Install dependencies
COPY go.mod ./
# COPY go.sum ./ # Uncomment if you have a go.sum file
RUN go mod download
COPY Gemfile Gemfile.lock ./
RUN bundle install
# Copy source code
COPY . .
COPY bbs.rb ./
COPY lib/ ./lib/
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bbs-server main.go
RUN mkdir -p /app/data
# Final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates tzdata
WORKDIR /root/
# Copy the binary from the builder stage
COPY --from=builder /app/bbs-server .
# Expose the port
EXPOSE 2323
# Run the binary
CMD ["./bbs-server"]
CMD ["bundle", "exec", "ruby", "bbs.rb"]