I'm having a weird Error when i try to run a simple script on docker container on redhat machine, this is the Docker file
From tomcat:7.0.70-jre7
ENV CLIENTNAME geocontact
ADD tomcat-users.xml /usr/local/tomcat/conf/
ADD app.war /usr/local/tomcat/webapps/
COPY app.sh /
ENTRYPOINT ["/app.sh"]
and app.sh is the script that cause the problem "only on redhat"
#!/bin/bash
set -e
mv /usr/local/tomcat/webapps/app.war /usr/local/tomcat/webapps/client1.war
catalina.sh run
and the error message :
mv cannot move '/usr/local/tomcat/webapps/app.war to a subdirectory of itself, '/usr/local/tomcat/webapps/client1.war'
a screenshot for the error and this only on redhat, i run the same image on ubuntu and centos with no problems.
You can rename your docker image by docker tag command. Use the below given command to do that. To rename docker container, use the rename sub-command as shown, in the following example, we renaming the container discourse_app to a new name disc_app.
Create a new container field, enter into it and perform the Records->Replace Field Contents menu command with the following calculation: Replace ( GetValue ( Table::ExternalOpenContainer ; 2 ) ; 1 ; 5 ; "file:" & Get ( FileName ) & "/" )
Unfortunately, this also means Docker containers don't have a file editor like Vim or Nano preinstalled. In this guide, we'll show you how to install an editor, make the changes you need to, and return the container to its original state, both from the command line and using the Docker extension inside VS Code.
The docker rename command renames a container. For example uses of this command, refer to the examples section below.
In your Dockerfile: ADD fileA fileB
. That will rename fileA
to fileB
at the moment of image creation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With