Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Building Web Container Image fails: "Can't rename file ... server.xml ... Invalid argument #753

Open
mmhdbw opened this issue Mar 24, 2023 · 0 comments
Labels

Comments

@mmhdbw
Copy link

mmhdbw commented Mar 24, 2023

Describe the bug
When I try to install SecurityShepherd, docker build phase fails:

 $ docker compose up
...
 => [stage-1  8/13] RUN apt-get -qq update && apt-get install -y patch libargon2-0             8.2s
 => [stage-1  9/13] RUN adduser --system --group tomcat --home /usr/local/tomcat               5.6s
 => [stage-1 10/13] RUN chown -R tomcat:${RUN_GROUP} /usr/local/tomcat                         8.2s
 => [stage-1 11/13] RUN rm -rf /usr/local/tomcat/webapps/ROOT                                  3.2s
 => ERROR [stage-1 12/13] RUN patch /usr/local/tomcat/conf/server.xml /usr/local/tomcat/conf/  0.4s
------
 > [stage-1 12/13] RUN patch /usr/local/tomcat/conf/server.xml /usr/local/tomcat/conf/serverxml.patch:
#0 0.350 patching file /usr/local/tomcat/conf/server.xml
#0 0.353 Hunk #2 succeeded at 109 (offset -1 lines).
#0 0.361 patch: **** Can't rename file /usr/local/tomcat/conf/server.xml to /usr/local/tomcat/conf/server.xml.orig : Invalid argument
------
failed to solve: process "/bin/sh -c patch /usr/local/tomcat/conf/server.xml /usr/local/tomcat/conf/serverxml.patch" did not complete successfully: exit code: 2 

To Reproduce
Steps to reproduce the behavior: (following the instructions in https://github.com/OWASP/SecurityShepherd/wiki/Docker-Environment-Setup)

  1. Login to fresh and up-to-date Ubuntu 22.04 system with Docker and docker-compose preinstalled; user is already member of docker group
  2. sudo apt install git maven openjdk-8-jdk
  3. git clone https://github.com/OWASP/SecurityShepherd.git
  4. cd SecurityShepherd
  5. mvn -Pdocker clean install -DskipTests
  6. docker compose up
  7. See error above

Expected behavior
The docker compose up should not fail but successfully start up docker containers.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.2 LTS
  • Browser: none; just a headless box that we entered with ssh

Further Information:

  • mvn version: 3.6.3-5
  • docker version: 23.0.1, built Thu Feb 9 19:47:01 2023, Git commit a5ee5b1
  • docker-compose version: v2.16.0 (compose as plugin)
  • java version: openjdk 11.0.18 2023-01-17

Screenshots
none, just see excerpt from build above

Additional context
Add any other context about the problem here.

@mmhdbw mmhdbw added the Bug label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant