Skip to content

Commit

Permalink
ci: Fix permission issue with task dist when running in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
carine-bonnafous committed Jul 30, 2024
1 parent a946a9a commit b2d32ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Dockerfile.legacy
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM composer:2.2 AS composer
FROM php:5.6-fpm

ARG UID

#ENV PHP_MEMORY_LIMIT=1024M
ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -21,7 +23,7 @@ RUN apt update && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*

# Create non-root user
RUN useradd -ms /bin/bash phpuser
RUN useradd -u ${UID} -ms /bin/bash phpuser
WORKDIR /home/phpuser
USER phpuser

Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks:
build:php5-6:
desc: Build test container
cmds:
- docker compose build php5-6
- docker compose build --build-arg UID="$(id -u)" php5-6

test:
desc: Run tests
Expand Down
1 change: 0 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ services:
build:
context: ./
dockerfile: Dockerfile.legacy
user: ${UID:-1000}:${GID:-1000}
volumes:
- ./:/home/phpuser
- /home/phpuser/src/vendor # do not mount vendor inside container
Expand Down

0 comments on commit b2d32ee

Please sign in to comment.