mirror of
https://github.com/plausible/analytics.git
synced 2025-01-03 07:08:04 +03:00
Clean up docker entrypoint script (#2217)
The .gitlab directory is no longer relevant. This moves the entrypoint script to `rel/` directory and copies from there.
This commit is contained in:
parent
8d8b66d266
commit
1519db72c2
@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
############################
|
|
||||||
function docker_create_config() {
|
|
||||||
############################
|
|
||||||
mkdir -p /kaniko/.docker/
|
|
||||||
echo "###############"
|
|
||||||
echo "Logging into GitLab Container Registry with CI credentials for kaniko..."
|
|
||||||
echo "###############"
|
|
||||||
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
############################
|
|
||||||
function docker_build_image() {
|
|
||||||
############################
|
|
||||||
if [[ -f Dockerfile ]]; then
|
|
||||||
echo "###############"
|
|
||||||
echo "Building Dockerfile-based application..."
|
|
||||||
echo "###############"
|
|
||||||
|
|
||||||
/kaniko/executor \
|
|
||||||
--cache=true \
|
|
||||||
--context "${CI_PROJECT_DIR}" \
|
|
||||||
--dockerfile "${CI_PROJECT_DIR}"/Dockerfile \
|
|
||||||
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHORT_SHA}" \
|
|
||||||
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_SLUG}-latest" \
|
|
||||||
\
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "No Dockerfile found."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
@ -61,7 +61,7 @@ RUN apk upgrade --no-cache
|
|||||||
|
|
||||||
RUN apk add --no-cache openssl ncurses libstdc++ libgcc
|
RUN apk add --no-cache openssl ncurses libstdc++ libgcc
|
||||||
|
|
||||||
COPY .gitlab/build-scripts/docker-entrypoint.sh /entrypoint.sh
|
COPY ./rel/docker-entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN chmod a+x /entrypoint.sh && \
|
RUN chmod a+x /entrypoint.sh && \
|
||||||
adduser -h /app -u 1000 -s /bin/sh -D plausibleuser
|
adduser -h /app -u 1000 -s /bin/sh -D plausibleuser
|
||||||
|
Loading…
Reference in New Issue
Block a user