Improve image building performance
This commit is contained in:
parent
3920dfa262
commit
91b0615809
1 changed files with 4 additions and 4 deletions
|
@ -5,11 +5,11 @@
|
||||||
#############################
|
#############################
|
||||||
FROM ghcr.io/archlinux/archlinux:latest AS builder
|
FROM ghcr.io/archlinux/archlinux:latest AS builder
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm go base-devel git
|
RUN nice -20 pacman -Syu --noconfirm go base-devel git mold
|
||||||
RUN mkdir /builder /builder/bin
|
RUN mkdir /builder /builder/bin
|
||||||
RUN git clone https://github.com/gorcon/rcon-cli /builder/rcon-cli
|
RUN git clone --depth=1 https://github.com/gorcon/rcon-cli /builder/rcon-cli
|
||||||
WORKDIR /builder/rcon-cli
|
WORKDIR /builder/rcon-cli
|
||||||
RUN go build -ldflags "-s -w -X main.ServiceVersion=mcsd-builder" -o /builder/bin/rcon ./cmd/gorcon/main.go
|
RUN nice -20 go build -ldflags "-s -w -fuse-ld=mold -X main.ServiceVersion=mcsd-builder" -o /builder/bin/rcon ./cmd/gorcon/main.go
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
## MAIN ##
|
## MAIN ##
|
||||||
|
@ -25,7 +25,7 @@ LABEL org.opencontainers.image.documentation="https://git.staropensource.de/Jere
|
||||||
LABEL org.opencontainers.image.source="https://git.staropensource.de/JeremyStarTM/MCServerDocker"
|
LABEL org.opencontainers.image.source="https://git.staropensource.de/JeremyStarTM/MCServerDocker"
|
||||||
LABEL org.opencontainers.image.licenses="GPL-3.0-only"
|
LABEL org.opencontainers.image.licenses="GPL-3.0-only"
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm jre17-openjdk jre11-openjdk jre8-openjdk
|
RUN nice -20 pacman -Syu --noconfirm jre17-openjdk jre11-openjdk jre8-openjdk
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
ADD entrypoint.sh /app/entrypoint.sh
|
ADD entrypoint.sh /app/entrypoint.sh
|
||||||
COPY --from=builder /builder/bin/rcon /usr/bin/rcon
|
COPY --from=builder /builder/bin/rcon /usr/bin/rcon
|
||||||
|
|
Loading…
Reference in a new issue