File size: 1,843 Bytes
bbc0396
e1209dd
bbc0396
 
67c82a9
bbc0396
944142a
07c11ae
d508f8d
28aee62
b211c8c
52401f9
 
67c82a9
 
 
 
af906fb
98e62b8
 
7f1d6db
eb44bad
eea0e84
 
eb44bad
67c82a9
 
cdf57a9
67c82a9
f033431
67c82a9
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
30
31
#1.21.1
FROM openjdk:21-slim
#1.12.2
#FROM openjdk:8-jre-alpine
WORKDIR /app
#1.21.1
RUN apt-get update -y 
RUN apt-get install wget -y
RUN apt-get install curl -y
RUN apt-get install jq -y
RUN wget -O server.jar https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/116/downloads/paper-1.21.1-116.jar
#1.12.2
#RUN wget -O server.jar https://api.papermc.io/v2/projects/paper/versions/1.12.2/builds/1620/downloads/paper-1.12.2-1620.jar
COPY --chown=1000 . /app
RUN chmod -R 777 /app
EXPOSE 7000
EXPOSE 7001
RUN --mount=type=secret,id=jsonid,mode=0444,required=true echo "$(cat /run/secrets/jsonid)">a.txt
#RUN bash save_auto.sh pruebas.txt archivo.txt https://www.jsonblob.com/api/jsonBlob/$(cat) &
RUN bash load_full.sh https://www.jsonblob.com/api/jsonBlob/$(cat a.txt) archivo.txt
RUN chmod -f 777 /app/archivo.txt | :
#RUN bash save_full.sh pruebas.txt archivo.txt https://www.jsonblob.com/api/jsonBlob/1291001013413470208
#RUN bash save.sh /app/pruebas.txt /app/hola.txt
#RUN bash upload.sh hola.txt https://www.jsonblob.com/api/jsonBlob/1291001013413470208
#RUN bash load.sh https://www.jsonblob.com/api/jsonBlob/1291001013413470208 archivo.txt
#Los de abajo puedes quitarlo si no usas esos plugins
RUN --mount=type=secret,id=bot_token,mode=0444,required=true sed -i "s/BOTTOKEN/$(cat /run/secrets/bot_token)/g" /app/plugins/DiscordSRV/config.yml
RUN --mount=type=secret,id=console_id,mode=0444,required=true sed -i "s/CONSOLEID/$(cat /run/secrets/console_id)/g" /app/plugins/DiscordSRV/config.yml
RUN --mount=type=secret,id=minekube_token,mode=0444,required=true sed -i "s/TOKENHERE/$(cat /run/secrets/minekube_token)/g" /app/plugins/connect/token.json
CMD bash save_auto.sh pruebas.txt archivo.txt https://www.jsonblob.com/api/jsonBlob/$(cat a.txt) & rm a.txt & java -Xmx2G -Xms2G -jar server.jar --noconsole --nojline
#CMD ls