forked from ferrumc-rs/ferrumc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (25 loc) · 948 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM rust:alpine3.20 AS build-stage
# Install build tools (e.g., Maven, Gradle)
# Copy source code
# Build commands (e.g., compile, package)
WORKDIR /app
COPY . /app
RUN apk add --no-cache musl-dev gcc
RUN cargo build --release -j 10
RUN strip target/release/ferrumc
# Stage 2: Runtime environment
FROM alpine:3.20 AS final-stage
WORKDIR /app
WORKDIR /app
RUN apk add --no-cache wget
COPY --from=build-stage /app/target/release/ferrumc /app/
# leaving this out for now since we dont have world loading
# Once we get the website working, we should put the file on our own server, instead of a contributors side project.
# RUN wget --progress=dot:giga https://aboleth.ai/static/ferumc-121-exampleworld.tar.gz -P /app
# RUN mkdir -p /app/import && \
# tar -xzvf /app/ferumc-121-exampleworld.tar.gz -C /app/import
# RUN ./ferrumc --import
# RUN rm /app/ferumc-121-exampleworld.tar.gz && \
# rm -rf /app/import
EXPOSE 25565
CMD ["./ferrumc"]