docker-entrypoint permission issue
softprops opened this issue · 1 comments
softprops commented
Thank's for putting together this project. when trying to deploy it with aws-cdk command line I ran into an issue with the container contents relating to the permissions of the entrypoint script
I didn't see any of the executable bits set on the file that npm pulls down
ls -al node_modules/@cloudgardener/cdk-aws-fargate-github-actions-runner/image/entrypoint.sh
-rw-r--r-- 1 doug staff 1027 Oct 26 1985 node_modules/@cloudgardener/cdk-aws-fargate-github-actions-runner/image/entrypoint.sh
OlesYudin commented
Hi @softprops ! I've got the same issue. You need to change permission for entrypoint.sh
. This file should be executable.
I've updated the Dockerfile in the next way:
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup runner && \
adduser \
--system \
--disabled-password \
--home /home/runner \
--ingroup runner \
runner
WORKDIR /home/runner
RUN GITHUB_RUNNER_VERSION=${GITHUB_RUNNER_VERSION:-$(curl -s https://api.github.com/repos/actions/runner/releases/latest | jq -r .tag_name | sed 's/v//g')} \
&& curl -sSLO https://github.com/actions/runner/releases/download/v${GITHUB_RUNNER_VERSION}/actions-runner-linux-x64-${GITHUB_RUNNER_VERSION}.tar.gz \
&& tar -zxvf actions-runner-linux-x64-${GITHUB_RUNNER_VERSION}.tar.gz \
&& rm -f actions-runner-linux-x64-${GITHUB_RUNNER_VERSION}.tar.gz \
&& ./bin/installdependencies.sh \
&& chown -R runner:runner /home/runner
COPY --chmod=755 entrypoint.sh entrypoint.sh # Changes here
USER runner
ENTRYPOINT ["./entrypoint.sh"]