Merge pull request #7 from thanek/docker_image_build
Docker image build
This commit is contained in:
commit
ba2cb2b578
3 changed files with 23 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
FROM eclipse-temurin:17-jdk-focal
|
FROM eclipse-temurin:17-jdk
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./build/libs/* ./app.jar
|
COPY ./build/libs/* ./nextcloud-dlna.jar
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["java","-jar","app.jar"]
|
CMD ["java","-jar","nextcloud-dlna.jar"]
|
||||||
|
|
|
@ -46,9 +46,10 @@ dependencies {
|
||||||
implementation 'org.jupnp:org.jupnp:2.7.1'
|
implementation 'org.jupnp:org.jupnp:2.7.1'
|
||||||
implementation 'org.jupnp:org.jupnp.support:2.7.1'
|
implementation 'org.jupnp:org.jupnp.support:2.7.1'
|
||||||
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
|
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
|
||||||
|
// to avoid snakeyaml-1.3 vulnerability CVE-2022-1471
|
||||||
|
implementation 'org.yaml:snakeyaml:2.2'
|
||||||
|
|
||||||
testImplementation 'org.apache.groovy:groovy:4.0.15'
|
testImplementation 'org.apache.groovy:groovy:4.0.15'
|
||||||
|
|
||||||
testImplementation('org.spockframework:spock-core:2.4-M1-groovy-4.0')
|
testImplementation('org.spockframework:spock-core:2.4-M1-groovy-4.0')
|
||||||
testImplementation('org.spockframework:spock-spring:2.4-M1-groovy-4.0')
|
testImplementation('org.spockframework:spock-spring:2.4-M1-groovy-4.0')
|
||||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
version=`./gradlew currentVersion | grep "Project version" | awk -F"version: " '{ print $2 }'`
|
||||||
|
|
||||||
|
echo "This will create docker image for version $version."
|
||||||
|
read -p "Continue [y/n]? " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
./gradlew clean build || exit
|
||||||
|
|
||||||
docker buildx create \
|
docker buildx create \
|
||||||
--use \
|
--use \
|
||||||
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
||||||
|
@ -5,6 +18,11 @@ docker buildx create \
|
||||||
|
|
||||||
docker buildx inspect --bootstrap
|
docker buildx inspect --bootstrap
|
||||||
|
|
||||||
|
docker buildx build \
|
||||||
|
--push \
|
||||||
|
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
||||||
|
--tag=thanek/nextcloud-dlna:$version .
|
||||||
|
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--push \
|
--push \
|
||||||
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
--platform=linux/arm/v7,linux/arm64/v8,linux/amd64 \
|
||||||
|
|
Loading…
Reference in a new issue