mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
BUILD - Optimize Dockerfile by using alpine as base image
This commit is contained in:
parent
51615db230
commit
2096c3c3cc
19
Dockerfile
19
Dockerfile
@ -1,28 +1,33 @@
|
||||
# build
|
||||
FROM debian:stable-slim as build
|
||||
FROM alpine:3 as build
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt-get -y update && apt-get install -y \
|
||||
RUN apk update && apk upgrade && apk add \
|
||||
linux-headers \
|
||||
git \
|
||||
clang \
|
||||
clang18 \
|
||||
make \
|
||||
libsqlite3-dev
|
||||
sqlite-dev
|
||||
|
||||
COPY src ./src
|
||||
COPY vendor ./vendor
|
||||
COPY .git ./.git
|
||||
COPY Makefile CMakeLists.txt version.h.in ./
|
||||
|
||||
RUN sed -i 's/^CC=clang$/&-18/' Makefile
|
||||
RUN sed -i 's/^CXX=clang++$/&-18/' Makefile
|
||||
|
||||
RUN make -j8
|
||||
|
||||
# prod
|
||||
FROM debian:stable-slim
|
||||
FROM alpine:3
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt-get -y update && apt-get install -y \
|
||||
libsqlite3-dev
|
||||
RUN apk update && apk upgrade && apk add \
|
||||
libstdc++ \
|
||||
sqlite-dev
|
||||
|
||||
COPY --from=build /usr/src/app/bin/fusion /bin/fusion
|
||||
COPY sql ./sql
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
namespace settings {
|
||||
@ -13,7 +14,7 @@ namespace settings {
|
||||
extern std::string SHARDSERVERIP;
|
||||
extern bool LOCALHOSTWORKAROUND;
|
||||
extern bool ANTICHEAT;
|
||||
extern time_t TIMEOUT;
|
||||
extern int64_t TIMEOUT;
|
||||
extern int VIEWDISTANCE;
|
||||
extern bool SIMULATEMOBS;
|
||||
extern int SPAWN_X;
|
||||
|
Loading…
Reference in New Issue
Block a user