Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6786547950 | |||
| 17a2caea49 | |||
| 8ff199ca10 |
10
Dockerfile
10
Dockerfile
@@ -1,21 +1,19 @@
|
|||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
# 1. Build the Nakama plugin
|
# 1. Build the Nakama plugin
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
FROM golang:1.22-alpine AS plugin_builder
|
FROM golang:1.22 AS plugin_builder
|
||||||
|
|
||||||
# Install dependencies needed for CGO plugin build
|
RUN apt-get update && apt-get install -y \
|
||||||
RUN apk add --no-cache git build-base binutils musl-dev
|
build-essential \
|
||||||
|
git
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|
||||||
# Download module deps first (better caching)
|
|
||||||
COPY go.mod go.sum ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Copy source code
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build plugin
|
|
||||||
RUN mkdir -p build && \
|
RUN mkdir -p build && \
|
||||||
CGO_ENABLED=1 go build \
|
CGO_ENABLED=1 go build \
|
||||||
--trimpath \
|
--trimpath \
|
||||||
|
|||||||
Reference in New Issue
Block a user