Improvements docker image building
This commit is contained in:
parent
7644e23dd2
commit
d131b25313
5 changed files with 25 additions and 28 deletions
|
@ -6,7 +6,7 @@ stages:
|
||||||
- image
|
- image
|
||||||
|
|
||||||
.img: &img
|
.img: &img
|
||||||
image: "domaindrivenarchitecture/ddadevops-dind:4.7.4"
|
image: "domaindrivenarchitecture/ddadevops-dind:4.10.5"
|
||||||
services:
|
services:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -16,7 +16,7 @@ stages:
|
||||||
- export IMAGE_TAG=$CI_COMMIT_TAG
|
- export IMAGE_TAG=$CI_COMMIT_TAG
|
||||||
|
|
||||||
.cljs-job: &cljs
|
.cljs-job: &cljs
|
||||||
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.4"
|
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.5"
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
|
@ -29,7 +29,7 @@ stages:
|
||||||
- npm install
|
- npm install
|
||||||
|
|
||||||
.clj-job: &clj
|
.clj-job: &clj
|
||||||
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.7.4"
|
image: "domaindrivenarchitecture/ddadevops-clj-cljs:4.10.5"
|
||||||
cache:
|
cache:
|
||||||
key: ${CI_COMMIT_REF_SLUG}
|
key: ${CI_COMMIT_REF_SLUG}
|
||||||
paths:
|
paths:
|
||||||
|
|
|
@ -1,16 +1,25 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eux
|
set -exo pipefail
|
||||||
|
|
||||||
apt update > /dev/null;
|
function main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
upgradeSystem
|
||||||
|
apt-get install -qqy unzip rsync jq imagemagick curl
|
||||||
|
|
||||||
apt install -y unzip rsync jq imagemagick curl
|
install -d /etc/lein/
|
||||||
|
install -m 0700 /tmp/entrypoint.sh /
|
||||||
|
install -m 0700 /tmp/functions.sh /usr/local/bin/
|
||||||
|
install -m 0700 /tmp/exclude.pattern /etc/
|
||||||
|
install -m 0700 /tmp/project.clj /etc/lein/
|
||||||
|
|
||||||
mkdir /etc/lein/
|
cd /etc/lein
|
||||||
|
lein deps
|
||||||
|
|
||||||
|
cleanupDocker
|
||||||
|
} > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
install -m 0700 /tmp/entrypoint.sh /
|
source /tmp/install_functions_debian.sh
|
||||||
install -m 0700 /tmp/functions.sh /usr/local/bin/
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
||||||
install -m 0700 /tmp/exclude.pattern /etc/
|
|
||||||
install -m 0700 /tmp/project.clj /etc/lein/
|
|
||||||
cd /etc/lein;
|
|
||||||
lein deps;
|
|
|
@ -1,12 +0,0 @@
|
||||||
FROM c4k-website-build
|
|
||||||
|
|
||||||
RUN apt update
|
|
||||||
RUN apt -yqq --no-install-recommends --yes install curl default-jre-headless
|
|
||||||
|
|
||||||
# TODO: path does not exist
|
|
||||||
RUN curl -L -o /tmp/serverspec.jar \
|
|
||||||
https://github.com/DomainDrivenArchitecture/dda-serverspec-crate/releases/download/2.0.0/dda-serverspec-standalone.jar
|
|
||||||
|
|
||||||
COPY serverspec.edn /tmp/serverspec.edn
|
|
||||||
|
|
||||||
RUN java -jar /tmp/serverspec.jar /tmp/serverspec.edn -v
|
|
|
@ -4,7 +4,7 @@
|
||||||
:license {:name "Apache License, Version 2.0"
|
:license {:name "Apache License, Version 2.0"
|
||||||
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
|
||||||
:dependencies [[org.clojure/clojure "1.11.1"]
|
:dependencies [[org.clojure/clojure "1.11.1"]
|
||||||
[org.clojure/tools.reader "1.3.6"]
|
[org.clojure/tools.reader "1.3.7"]
|
||||||
[org.domaindrivenarchitecture/c4k-common-clj "6.1.0"]
|
[org.domaindrivenarchitecture/c4k-common-clj "6.1.0"]
|
||||||
[hickory "0.7.1" :exclusions [viebel/codox-klipse-theme]]]
|
[hickory "0.7.1" :exclusions [viebel/codox-klipse-theme]]]
|
||||||
:target-path "target/%s/"
|
:target-path "target/%s/"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
:main dda.c4k-website.uberjar
|
:main dda.c4k-website.uberjar
|
||||||
:uberjar-name "c4k-website-standalone.jar"
|
:uberjar-name "c4k-website-standalone.jar"
|
||||||
:dependencies [[org.clojure/tools.cli "1.0.219"]
|
:dependencies [[org.clojure/tools.cli "1.0.219"]
|
||||||
[ch.qos.logback/logback-classic "1.4.11"
|
[ch.qos.logback/logback-classic "1.4.14"
|
||||||
:exclusions [com.sun.mail/javax.mail]]
|
:exclusions [com.sun.mail/javax.mail]]
|
||||||
[org.slf4j/jcl-over-slf4j "2.0.9"]]}}
|
[org.slf4j/jcl-over-slf4j "2.0.9"]]}}
|
||||||
:release-tasks [["test"]
|
:release-tasks [["test"]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"src/test/cljc"
|
"src/test/cljc"
|
||||||
"src/test/cljs"
|
"src/test/cljs"
|
||||||
"src/test/resources"]
|
"src/test/resources"]
|
||||||
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "6.0.1"]
|
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "6.1.0"]
|
||||||
[hickory "0.7.1"]]
|
[hickory "0.7.1"]]
|
||||||
:builds {:frontend {:target :browser
|
:builds {:frontend {:target :browser
|
||||||
:modules {:main {:init-fn dda.c4k-website.browser/init}}
|
:modules {:main {:init-fn dda.c4k-website.browser/init}}
|
||||||
|
|
Loading…
Reference in a new issue