kopia lustrzana https://github.com/kartoza/docker-postgis
Generate all locale only in deloyment mode
rodzic
0342801ab2
commit
e703e86431
|
@ -52,6 +52,11 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Do we need to generate locale?
|
||||
id: is_generate_locale
|
||||
if: github.ref == env.latest-ref
|
||||
run: echo "::set-output name=is_generate::"
|
||||
|
||||
- name: Build base image
|
||||
id: docker_build_base
|
||||
uses: docker/build-push-action@v2
|
||||
|
@ -61,6 +66,7 @@ jobs:
|
|||
push: false
|
||||
tags: ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.distro }}-${{ matrix.imageVersion }}-${{ matrix.imageVariant }}
|
||||
build-args: |
|
||||
GENERATE_ALL_LOCALE=${{ steps.is_generate_locale.outputs.is_generate }}
|
||||
DISTRO=${{ matrix.distro }}
|
||||
IMAGE_VERSION=${{ matrix.imageVersion }}
|
||||
IMAGE_VARIANT=${{ matrix.imageVariant }}
|
||||
|
@ -189,6 +195,11 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Do we need to generate locale?
|
||||
id: is_generate_locale
|
||||
if: github.ref == env.latest-ref
|
||||
run: echo "::set-output name=is_generate::"
|
||||
|
||||
- name: Build base image
|
||||
id: docker_build_base
|
||||
uses: docker/build-push-action@v2
|
||||
|
@ -198,6 +209,7 @@ jobs:
|
|||
push: ${{ github.ref == env.latest-ref }}
|
||||
tags: ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.distro }}-${{ matrix.imageVersion }}-${{ matrix.imageVariant }}
|
||||
build-args: |
|
||||
GENERATE_ALL_LOCALE=${{ steps.is_generate_locale.outputs.is_generate }}
|
||||
DISTRO=${{ matrix.distro }}
|
||||
IMAGE_VERSION=${{ matrix.imageVersion }}
|
||||
IMAGE_VARIANT=${{ matrix.imageVariant }}
|
||||
|
|
|
@ -31,8 +31,13 @@ RUN chmod 0755 /gdal_install.sh;/bin/bash /gdal_install.sh
|
|||
# Generating locales takes a long time. Utilize caching by runnig it by itself
|
||||
# early in the build process.
|
||||
|
||||
# Generate all locale only on deployment mode build
|
||||
# Set to empty string to generate only default locale
|
||||
ARG GENERATE_ALL_LOCALE=1
|
||||
|
||||
COPY scripts/locale.gen /etc/locale.gen
|
||||
RUN set -eux \
|
||||
&& [[ (! -z "${GENERATE_ALL_LOCALE}") && (! $GENERATE_ALL_LOCALE -eq 0) ]] \
|
||||
&& /usr/sbin/locale-gen
|
||||
|
||||
ENV LANG=en_US.UTF-8 \
|
||||
|
|
Ładowanie…
Reference in New Issue