diff --git a/.dockerignore b/.dockerignore index 46b678e..d48a12a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,6 @@ -# Ignore everything except selected directory -** - -!base_build -base_build/README.md - -!scripts -!scenario_tests/utils/requirements.txt \ No newline at end of file +.github +.venv +venv +.docs +sample +.env \ No newline at end of file diff --git a/.github/workflows/build-latest.yaml b/.github/workflows/build-latest.yaml index 7612df8..bf8469a 100644 --- a/.github/workflows/build-latest.yaml +++ b/.github/workflows/build-latest.yaml @@ -15,16 +15,6 @@ on: # required: true # default: slim workflow_dispatch: - inputs: - cache-invalidation-number: - description: Temporarily increase this number to invalidate caches for current build - required: true - default: 1 - no-cache: - description: Do not use cache when building the image - required: true - type: boolean - default: false pull_request: branches: - develop @@ -64,7 +54,6 @@ jobs: with: context: . file: Dockerfile - no-cache: ${{ github.event.inputs.no-cache }} push: false load: true tags: kartoza/postgis:manual-build @@ -77,11 +66,11 @@ jobs: POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }} -# cache-from: | -# type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}- -# type=gha,scope=prod-${{ github.event.inputs.cache-invalidation-number }}- -# type=gha,scope=base-${{ github.event.inputs.cache-invalidation-number }}- - cache-to: type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}- + cache-from: | + type=gha,scope=test + type=gha,scope=prod + type=gha,scope=base + cache-to: type=gha,scope=test target: postgis-test - name: Run scenario test ${{ matrix.scenario }} @@ -135,7 +124,6 @@ jobs: with: context: . file: Dockerfile - no-cache: ${{ github.event.inputs.no-cache }} push: true tags: | ${{ steps.docker_meta.outputs.tags }}-${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }} @@ -148,9 +136,9 @@ jobs: POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }} -# cache-from: | -# type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}- -# type=gha,scope=prod-${{ github.event.inputs.cache-invalidation-number }}- -# type=gha,scope=base-${{ github.event.inputs.cache-invalidation-number }}- - cache-to: type=gha,scope=test-${{ github.event.inputs.cache-invalidation-number }}- + cache-from: | + type=gha,scope=test + type=gha,scope=prod + type=gha,scope=base + cache-to: type=gha,scope=test target: postgis-test diff --git a/Dockerfile b/Dockerfile index 9314b21..fcbed78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,8 @@ ENV LANG=en_US.UTF-8 \ LANGUAGE=en_US:en \ LC_ALL=en_US.UTF-8 -COPY base_build/scripts/locale.gen /etc/all.locale.gen -COPY base_build/scripts/locale-filter.sh /etc/locale-filter.sh +COPY ./base_build/scripts/locale.gen /etc/all.locale.gen +COPY ./base_build/scripts/locale-filter.sh /etc/locale-filter.sh RUN if [ -z "${GENERATE_ALL_LOCALE}" ] || [ $GENERATE_ALL_LOCALE -eq 0 ]; \ then \ cat /etc/all.locale.gen | grep "${LANG}" > /etc/locale.gen; \ @@ -126,7 +126,7 @@ RUN apt-get -y --purge autoremove \ EXPOSE 5432 # Copy scripts -ADD scripts /scripts +ADD ./scripts /scripts WORKDIR /scripts RUN chmod +x *.sh @@ -145,7 +145,7 @@ ENTRYPOINT /scripts/docker-entrypoint.sh ############################################################################## FROM postgis-prod AS postgis-test -COPY scenario_tests/utils/requirements.txt /lib/utils/requirements.txt +COPY ./scenario_tests/utils/requirements.txt /lib/utils/requirements.txt RUN set -eux \ && export DEBIAN_FRONTEND=noninteractive \