Merge branch 'dev' of https://git.n64.cc/nosial/ncc into dev

This commit is contained in:
Netkas 2023-10-08 15:13:31 -04:00
commit 43cbe801d8
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
3 changed files with 31 additions and 20 deletions

View file

@ -3,9 +3,8 @@ image: php:8.2
stages:
- setup
- build
- build-docker
- docker
- publish
- publish-docker
before_script:
- apt update -yqq
@ -51,9 +50,9 @@ build-debian:
- build/*.deb
# Build the Alpine Docker image
ncc-docker-build-alpine:
docker-alpine:
image: docker:latest
stage: build-docker
stage: docker
services:
- docker:dind
before_script:
@ -61,22 +60,22 @@ ncc-docker-build-alpine:
script:
- |
if [[ "$CI_COMMIT_BRANCH" == "master" ]]; then
DOCKER_TAG="latest-alpine"
DOCKER_TAG="latest"
elif [[ ! -z "$CI_COMMIT_TAG" ]]; then
DOCKER_TAG="$CI_COMMIT_TAG-alpine"
DOCKER_TAG="$CI_COMMIT_TAG"
else
DOCKER_TAG="$CI_COMMIT_REF_SLUG-alpine"
DOCKER_TAG="$CI_COMMIT_REF_SLUG"
fi
- docker build -f Dockerfile.alpine -t $CI_REGISTRY_IMAGE:$DOCKER_TAG .
- docker build -f Dockerfile -t $CI_REGISTRY_IMAGE:$DOCKER_TAG .
- docker push $CI_REGISTRY_IMAGE:$DOCKER_TAG
rules:
- exists:
- Dockerfile.alpine
- Dockerfile
# Build the Debian Docker image
ncc-docker-build-debian:
docker-debian:
image: docker:latest
stage: build-docker
stage: docker
services:
- docker:dind
before_script:
@ -84,7 +83,7 @@ ncc-docker-build-debian:
script:
- |
if [[ "$CI_COMMIT_BRANCH" == "master" ]]; then
DOCKER_TAG="latest-debian"
DOCKER_TAG="debian"
elif [[ ! -z "$CI_COMMIT_TAG" ]]; then
DOCKER_TAG="$CI_COMMIT_TAG-debian"
else

View file

@ -18,8 +18,11 @@
# This image is intended to be used as a base for projects using ncc.
#
# Build-time args
ARG PHP_VERSION=8.2
# Builder stage: downloads necessary files and serves them on a silver platter.
FROM php:8.2-fpm AS builder
FROM php:${PHP_VERSION}-fpm AS builder
ENV GENERIC_BUILD_PATH=/tmp/ncc_build
WORKDIR /tmp
@ -43,9 +46,12 @@ RUN cd /tmp/ncc && make redist
# Main stage: Copies build files and installs all dependencies
FROM php:8.2-fpm-alpine AS production
LABEL maintainer="netkas <netkas@nosial.net>"
LABEL description="ncc alpine docker image"
FROM php:${PHP_VERSION}-fpm-alpine AS production
# OSI labels
LABEL maintainer="Netkas <netkas@nosial.net>"
LABEL description="ncc's official Docker image"
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Copy downloaded files

View file

@ -18,8 +18,11 @@
# This image is intended to be used as a base for projects using ncc.
#
# Build-time args
ARG PHP_VERSION=8.2
# Builder stage: downloads necessary files and serves them on a silver platter.
FROM php:8.2-fpm AS builder
FROM php:${PHP_VERSION}-fpm AS builder
ENV GENERIC_BUILD_PATH=/tmp/ncc_build
WORKDIR /tmp
@ -43,9 +46,12 @@ RUN cd /tmp/ncc && make redist
# Main stage: Copies build files and installs all dependencies
FROM php:8.2-fpm AS production
LABEL maintainer="netkas <netkas@nosial.net>"
LABEL description="ncc debian docker image"
FROM php:${PHP_VERSION}-fpm AS production
# OSI labels
LABEL maintainer="Netkas <netkas@nosial.net>"
LABEL description="ncc's official Docker image"
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Copy downloaded files