I have to an image which runs under a different user than "root" named "user" with the UID of 1000. When the pipeline's "Build setup" is run, after the cloining, the logs look like as if the chmod operation fails:
...
HEAD is now at 8bc500b fixup! project init
+ chmod 777 $BUILD_DIR
Skipping artifact upload for failed step
...
The image is run-as-user 1000. What is the issue here? The output is quite little, so I need to ask.
Here is my bitbucket-pipelines.yml:
image:
name: vicampotk/php:7.2-cli-alpine-build
run-as-user: 1000
clone:
depth: 50
pipelines:
default:
- step:
name: lint php
script:
- php --version
- composer install --no-interaction --no-suggest --no-progress
artifacts:
- vendor/**
- step:
name: unit tests, composer build, ci scripts
script:
- composer cs-check
- composer ci
artifacts:
- build/html/** And that is the Dockerfile of that image:
FROM php:7.2-cli-alpine3.7
COPY shell /tmp/shell
RUN : && addgroup -g 1000 user && adduser -D -G user -u 1000 user && chmod u+s /bin/su && apk add --no-cache git && apk add --no-cache $PHPIZE_DEPS && /tmp/shell/install-composer.sh && rm -rf /tmp/shell && pecl install xdebug && docker-php-ext-enable xdebug && apk del $PHPIZE_DEPS && :
USER user