June 27, 20251 yr I have a dockerfile that is successfully running, but is having an issue with the scripts and the scripts are not running cause they are not found:I don't understand the issue. The run.sh script is located in the same folder as the dockerfile and docker-compose.yml. Why would it not be available from within the container. Or why would it not be making it over to the container?The only thing in the log is:exec /run.sh: no such file or directoryHere is the dockerfile:# Use Ubuntu 24.04 (Noble Numbat) as the base imageARG P4_BASEIMAGE=ubuntu:24.04FROM $P4_BASEIMAGE AS perforce-baseMAINTAINER VanENV container docker# Install required system dependencies, including gnupg for handling GPG keysRUN apt-get update && apt-get install -y \ cron \ tar \ gzip \ curl \ openssl \ sudo \ debianutils \ gnupg2 \ lsb-release && \ rm -rf /var/lib/apt/lists/*# Download and install the Perforce GPG key directly into the APT keyringRUN curl -fsSL https://package.perforce.com/perforce.pubkey | gpg --dearmor -o /usr/share/keyrings/perforce-archive-keyring.gpg# Add Perforce repository and ensure it's signed with the correct keyRUN echo "deb [signed-by=/usr/share/keyrings/perforce-archive-keyring.gpg] https://package.perforce.com/apt/ubuntu noble release" > /etc/apt/sources.list.d/perforce.list# Update package lists and install Perforce server and CLIRUN apt-get update && \ apt-get install -y p4-server p4-cli && \ rm -rf /var/lib/apt/lists/*# Install necessary utilities like gosu, tini, and s6-overlay with updated download linksRUN curl -fsSL https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64 -o /usr/local/bin/gosu \ && curl -fsSL https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64.asc -o /usr/local/bin/gosu.asc \ && gpg --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && rm /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true# ENTRYPOINT ["/init"]# Make sure the run.sh script is executableADD ./run.sh /RUN chmod +x /run.sh# Use /run.sh as the entry point to start the containerENTRYPOINT ["/run.sh"]FROM perforce-base AS perforce-serverMAINTAINER Van# Use the same P4_VERSION build argumentARG P4_VERSION=2025.1# Install Perforce server and CLI with the version from the build argumentRUN apt-get update && \ apt-get install -y p4-server p4-cli && \ rm -rf /var/lib/apt/lists/* EXPOSE 1666ENV NAME p4depotENV P4CONFIG .p4configENV DATAVOLUME /dataENV P4PORT 1666ENV P4USER p4adminVOLUME ["$DATAVOLUME"]ADD ./p4-users.txt /root/ADD ./p4-groups.txt /root/ADD ./p4-protect.txt /root/ADD ./typemap.txt /root/ADD ./setup-perforce.sh /usr/local/bin/# Default command to run the server via run.sh or p4d#CMD ["/run.sh"]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.