Copy over dart container and add to jenkinsfile
This commit is contained in:
parent
650579b474
commit
53536fffc3
4 changed files with 73 additions and 1 deletions
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
|
@ -48,6 +48,38 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage("Build Dart Containers") {
|
||||||
|
agent {
|
||||||
|
label 'dockermain'
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sh '''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker build -t git.zontreck.com/ariascreations/yolks:dart_stable dart/stable
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Push Dart Containers") {
|
||||||
|
agent {
|
||||||
|
label 'dockermain'
|
||||||
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sh '''
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker push git.zontreck.com/ariascreations/yolks:dart_stable
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage("Cleanup") {
|
stage("Cleanup") {
|
||||||
agent {
|
agent {
|
||||||
label 'dockermain'
|
label 'dockermain'
|
||||||
|
|
6
build.sh
6
build.sh
|
@ -4,4 +4,8 @@
|
||||||
docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine
|
docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine
|
||||||
docker build -t git.zontreck.com/ariascreations/yolks:debian base/debian
|
docker build -t git.zontreck.com/ariascreations/yolks:debian base/debian
|
||||||
docker build -t git.zontreck.com/ariascreations/yolks:ubuntu base/ubuntu
|
docker build -t git.zontreck.com/ariascreations/yolks:ubuntu base/ubuntu
|
||||||
docker build -t git.zontreck.com/ariascreations/yolks:arch base/arch
|
docker build -t git.zontreck.com/ariascreations/yolks:arch base/arch
|
||||||
|
|
||||||
|
|
||||||
|
# Build dart containers
|
||||||
|
docker build -t git.zontreck.com/ariascreations/yolks:dart_stable dart/stable
|
16
dart/entrypoint.sh
Normal file
16
dart/entrypoint.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
cd /home/container
|
||||||
|
|
||||||
|
# Make internal Docker IP address available to processes
|
||||||
|
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}')
|
||||||
|
export INTERNAL_IP
|
||||||
|
|
||||||
|
# Print Dart version
|
||||||
|
dart --version
|
||||||
|
|
||||||
|
# Replace startup variables
|
||||||
|
MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')
|
||||||
|
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
||||||
|
|
||||||
|
# Run the server
|
||||||
|
eval ${MODIFIED_STARTUP}
|
20
dart/stable/Dockerfile
Normal file
20
dart/stable/Dockerfile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
FROM dart:stable
|
||||||
|
|
||||||
|
LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com"
|
||||||
|
LABEL upstream="https://github.com/pelican-eggs/yolks"
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y tzdata iproute2 git ca-certificates
|
||||||
|
|
||||||
|
RUN useradd -m -d /home/container -s /bin/bash container
|
||||||
|
ENV USER=container HOME=/home/container
|
||||||
|
|
||||||
|
USER container
|
||||||
|
ENV USER=container HOME=/home/container
|
||||||
|
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
|
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
ENTRYPOINT ["/bin/bash", "-c", "--"]
|
||||||
|
CMD ["/entrypoint.sh"]
|
Loading…
Add table
Add a link
Reference in a new issue