Use a final stage instead that never gets uploaded to the container registry.
This commit is contained in:
parent
f28fd616f2
commit
339ba1578e
5 changed files with 24 additions and 23 deletions
|
@ -2,9 +2,6 @@ FROM git.zontreck.com/ariascreations/buildenvironments:appimage
|
|||
|
||||
ENV PUB NAN
|
||||
ENV AGENT NAN
|
||||
ENV GRADLEPROP NAN
|
||||
ENV PRIVKEY NAN
|
||||
ENV PUBKEY NAN
|
||||
|
||||
WORKDIR /
|
||||
RUN curl -sO https://ci.zontreck.com/jnlpJars/agent.jar
|
||||
|
|
14
LinuxGeneralCompiler/FinalStage/Dockerfile
Normal file
14
LinuxGeneralCompiler/FinalStage/Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM git.zontreck.com/ariascreations/buildenvironments:linux
|
||||
|
||||
WORKDIR /root/.gradle
|
||||
ADD ./secret/gradle.properties ./gradle.properties
|
||||
|
||||
WORKDIR /root/.ssh
|
||||
ADD ./secret/id_rsa ./id_rsa
|
||||
ADD ./secret/id_rsa.pub ./id_rsa.pub
|
||||
|
||||
RUN chmod 0600 id_rsa
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENTRYPOINT [ "/bin/bash", "/entrypoint.sh" ]
|
|
@ -2,12 +2,4 @@
|
|||
|
||||
echo $PUB | dart pub token add https://git.zontreck.com/api/packages/AriasCreations/pub
|
||||
|
||||
mkdir -pv ~/.gradle
|
||||
echo $GRADLEPROP | base64 -d > ~/.gradle/gradle.properties
|
||||
|
||||
mkdir -pv ~/.ssh
|
||||
echo "$PRIVKEY" | base64 -d > ~/.ssh/id_rsa
|
||||
echo "$PUBKEY" | base64 -d > ~/.ssh/id_rsa.pub
|
||||
chmod 0600 ~/.ssh/id_rsa
|
||||
|
||||
java -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -jar /agent.jar -url "https://ci.zontreck.com" -secret "$AGENT" -name "Linux" -workDir "/builder"
|
||||
|
|
|
@ -2,7 +2,7 @@ version: "3"
|
|||
|
||||
services:
|
||||
linuxbuilder:
|
||||
image: git.zontreck.com/ariascreations/buildenvironments:linux
|
||||
image: LinuxAgent
|
||||
container_name: linuxbuilder
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
|
|
20
run.sh
20
run.sh
|
@ -3,20 +3,18 @@
|
|||
echo -ne "AGENT=" > .env
|
||||
cat "$AGENT" >> .env
|
||||
|
||||
echo -ne "\nGRADLEPROP=" >> .env
|
||||
cat "$GRADLEPROP" | base64 >> .env
|
||||
|
||||
echo -ne "\nPUB" >> .env
|
||||
echo -ne "\nPUB=" >> .env
|
||||
cat "$PUB" >> .env
|
||||
|
||||
echo -ne "\nPRIVKEY=" >> .env
|
||||
cat "$PRIVKEY" | base64 >> .env
|
||||
|
||||
echo -ne "\nPUBKEY=" >> .env
|
||||
cat "$PUBKEY" | base64 >> .env
|
||||
|
||||
echo -ne"\nFSAGENT=" >> .env
|
||||
echo -ne "\nFSAGENT=" >> .env
|
||||
cat "$FSAGENT" >> .env
|
||||
|
||||
mkdir -pv LinuxGeneralCompiler/FinalStage/secret
|
||||
cp "$PRIVKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa
|
||||
cp "$PUBKEY" LinuxGeneralCompiler/FinalStage/secret/id_rsa.pub
|
||||
cp "$GRADLEPROP" LinuxGeneralCompiler/FinalStage/secret/gradle.properties
|
||||
|
||||
docker build -t LinuxAgent LinuxGeneralCompiler/FinalStage
|
||||
|
||||
|
||||
docker-compose up -d
|
Loading…
Add table
Add a link
Reference in a new issue