Skip to content

Commit

Permalink
Test docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
baschny committed Apr 23, 2024
1 parent fdb160e commit 39a69d9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,23 @@ jobs:
id
pwd
ls -la
- name: "Set up Docker Buildx"
id: builder
uses: docker/setup-buildx-action@v2

- name: "Docker build only (fpm image)"
uses: docker/build-push-action@v4
with:
tags: "test"
platforms: ${{ env.PLATFORMS }}
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
target: test
build-args: |
PHP_MINOR_VERSION=${{ matrix.php-version }}
- name: "Test docker"
run: |
docker run -ti --rm --entrypoint "bash" test -c "ls -la /home"
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,11 @@ COPY files/entrypoint-extras.sh /
RUN chmod +x /*.sh && chown -R application: /home/application

ENTRYPOINT ["/entrypoint.sh"]

# -------------------------------------------------------------------------

FROM php:${PHP_MINOR_VERSION}-fpm as test
ARG NODE_VERSION
ARG PHP_MINOR_VERSION
RUN adduser --disabled-password --gecos "" application
COPY files/ssh/ /

0 comments on commit 39a69d9

Please sign in to comment.