use kaniko to build container
This commit is contained in:
parent
c9db2ac370
commit
04bc0ba371
@ -1,9 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
@ -1,13 +1,18 @@
|
|||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: thallian/airsonic
|
CONTAINER_NAME: thallian/airsonic
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
image:
|
||||||
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
|
- mkdir -p /kaniko/.docker
|
||||||
- docker build -t $IMAGE_NAME:$CI_COMMIT_SHA .
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||||
- docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME .
|
- >-
|
||||||
- docker build -t $IMAGE_NAME:latest .
|
/kaniko/executor
|
||||||
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
|
--context "$CI_PROJECT_DIR"
|
||||||
- docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME
|
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
||||||
- docker push $IMAGE_NAME:latest
|
--destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
|
||||||
|
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
|
||||||
|
--destination "$CONTAINER_NAME:latest"
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -1,8 +1,8 @@
|
|||||||
FROM alpine:3.14 AS builder
|
FROM alpine:3.15 AS builder
|
||||||
|
|
||||||
ENV VERSION=11.0.0-SNAPSHOT.20211214174334
|
ENV VERSION=11.0.0-SNAPSHOT.20220213174344
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
openjdk11-jdk \
|
openjdk17-jdk \
|
||||||
maven \
|
maven \
|
||||||
git
|
git
|
||||||
|
|
||||||
@ -24,9 +24,7 @@ RUN apk add --no-cache \
|
|||||||
ffmpeg \
|
ffmpeg \
|
||||||
flac \
|
flac \
|
||||||
opus \
|
opus \
|
||||||
lame
|
lame \
|
||||||
|
|
||||||
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \
|
|
||||||
openjdk17-jre-headless
|
openjdk17-jre-headless
|
||||||
|
|
||||||
RUN addgroup -g 2222 airsonic
|
RUN addgroup -g 2222 airsonic
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
/home/airsonic/data/db true airsonic 0644 0755
|
|
||||||
/home/airsonic/data/lastfmcache true airsonic 0644 0755
|
|
||||||
/home/airsonic/data/lucene2 true airsonic 0644 0755
|
|
||||||
/home/airsonic/data/thumbs true airsonic 0644 0755
|
|
||||||
/home/airsonic/data/transcode false airsonic 0644 0755
|
|
||||||
/home/airsonic/playlists true airsonic 0640 0755
|
|
||||||
/home/airsonic/podcasts true airsonic 0640 0755
|
|
||||||
/home/airsonic/airsonic.log false airsonic 0640 0755
|
|
||||||
/home/airsonic/airsonic.properties false airsonic 0640 0755
|
|
||||||
/home/airsonic/rollback.sql false airsonic 0640 0755
|
|
1
rootfs/etc/s6-overlay/s6-rc.d/airsonic/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/airsonic/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
Loading…
Reference in New Issue
Block a user