Writing because I have a stranger problem with Docker File process
The problem is regarding Docker File Context. As far as I understood the directory context that I can access from Dockerfiles is one directory up and one directory down
Example Directory Tree
A - B - C - D - E
If my docketfile is on C
I can access B D
But I can’t access A E
I have a problem because this is my case
My Docker file is on C
And I need to access files from B D E
And I really don’t know how to do it
I need to access it
Becaiuse my target jar is on E
And I need to do an ADD to this file to implementing docket hot deploy with Spring Dev Tools
Somenthing like on Docker
ADD .\D\E\jar.file jar.file
ENtrypoint xxx
Expose xxx
And I still need to access B to get some other files.
Was Clear?
Sorry I know is strange
If you can do something it does not mean it is right or if is something not recommended so it means the issue can arise.
If you read General guidelines and recommendations, It will recommend keeping the thing in context, then why you need to copy thing from the different drive? Btw it is not possible in Linux as docker need to copy from the context so better to keep your jar file in dockerfile context.
Understand build context
When you issue a docker build command, the current working directory
is called the build context. By default, the Dockerfile is assumed to
be located here, but you can specify a different location with the
file flag (-f). Regardless of where the Dockerfile actually lives, all
recursive contents of files and directories in the current directory
are sent to the Docker daemon as the build context.
Related
I would like to be able to run QuestDB from IntelliJ so that it sees the data I keep in a particular folder. What class should I run?, how do I set the root folder for the data?, is there anything I need to do regarding configuration (ports and the like)?, do I need to set any size for the memory settings?
I assume you have already imported QuestDB as a Maven project in IntelliJ.
In order to start it from the IDE, the entry point is the io.questdb.ServerMain class.
Then you need to create a new Run Configuration:
Open the Run/Debug configurations dialog, create a new Application configuration and make sure that you point out root dir with a -d flag (in the Program arguments field). Here's how my configuration looks like:
Use Case
The code that I wish to edit in che is downloaded from a private SVN repository and uses a private nexus repository for maven dependencies. Due to this I need to use my custom settings.xml from "C:\Users\.m2".
It would be good to use the local maven repository too, hence the approach of creating a custom dockerfile that adds settings.xml was not used.
Setup
I created a user environment variable "CHE_EXTRA_VOLUME_MOUNT" with the value "~/.m2:/home/user/.m2".
I can see the env variable from "Docker Quickstart Terminal".
Environment
OS: Windows 7
Docker version: 1.12.6, build 78d1802
Docker image: eclipse/che-server:5.0.0
Problem
Can't see the mount path "/home/user/.m2" in any workspace.
Can someone please help me with this use case?
I see a couple issues. First, in the che.env file, you should be modifying CHE_WORKSPACE_VOLUME. The CHE_EXTRA_VOLUME_MOUNT is an older name that applied to the 4.x releases.
Second, the mount path you are using. The value that you provided on the mount path is likely not going to work well if it's on Windows 7. This is because you are using Boot2Docker on that system, and so VirtualBox limits files that can be mounted to those that exist as a subfolder of %userprofile%.
So:
1. First make sure that c:\Users\.m2 is part of this subfolder, and then:
2. Use the absolute path to your .m2 folder in the mount in the che.env:
CHE_WORKSPACE_VOLUME=/C/Users/<user_name>/.m2:/home/user/.m2
This funky path naming for volume mounts is a limitation in how the Docker client can understand volume mounts if you are using it on the batch shell.
A matching answer is posted on Che's support site - https://github.com/eclipse/che/issues/3888
Looks like it is a bug in eclipse che. You can create an issue at https://github.com/eclipse/che/issues
I am trying to use Flink local on Linux and Windows, for my bachelor
thesis. I have found these steps for local setup:
https://ci.apache.org/projects/flink/flink-docs-release-1.1/quickstart/setup_quickstart.html#start-a-local-flink-cluster
When I try this I got only errors like this:
-bash: bin/start-local.sh: No such file or directory
When I go to the directory of the start-local.sh file then I got
/flink-1.1.2/flink-dist/src/main/flink-bin/conf/flink-conf.yaml: No such file or directory
Same problem with Windows.
What do I have to change so that it works?
It seems that you have downloaded the sources. It is necessary to download one of binaries from here: https://flink.apache.org/downloads.html#binaries. Then, follow the given instructions for local setup.
Of course if you want to build Flink from sources, use this guide: https://github.com/apache/flink#building-apache-flink-from-source.
I'm trying to get bake working on my subdomain which is under shared hosting.
Is there a way we can get this working? I know how to connect to server via ssh shell but then what do I do after that?
First cd to the directory where the cake script is. On a Linux webserver, this would probably be something like ~/cake/console/, if you've put the CakePHP libs outside your web-accessible directories. If you've put everything into your web directory you'll probably have to go somewhere like ~/www/cake/console/.
Then simply type ./cake bake and take it from there.
You shouldn't have to do anything with environment variables. This is only necessary if you want to be able to run the cake console from any directory. I find it less of a hassle to just cd into the cake console's directory and run it using ./cake.
same as local machine cd <path_to_console> cake
if you do not know path_to_console ask for host support,
also path_to_console may be in environment path then just use cake in all dirs
I'm having trouble finding documentation regarding this. After some googling I find that bin, conf,logs, temp, webapps, work are directories that should exist in CATALINA_BASE.
temp, logs, webapps, bin and work I don't have any trouble understanding.
bin I suppose is just another bin folder, if for some reason both CATALINA_HOME and CATALINA_BASE are in PATH, then scripts in both folders will be available for execution.
But how about conf? Will the content of CATALINA_HOME/conf be totally ignored if CATALINA_BASE is set? Suppose I only would need to customize only a few config files pr. CATALINA_BASE, would I still need to keep a complete set of config files in CATALINA_BASE/conf, or could the standard config files in CATALINA_HOME/conf be shared?
And ditto for CATALINA_BASE/lib ... would this work as a "global" lib folder pr. instance?
You can find the answer in the Tomcat documentation:
http://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt
Advanced Configuration - Multiple Tomcat Instances
In many circumstances, it is desirable to have a single copy of a
Tomcat binary distribution shared among multiple users on the same
server. To make this possible, you can set the $CATALINA_BASE
environment variable to the directory that contains the files for your
'personal' Tomcat instance.
When you use $CATALINA_BASE, Tomcat will calculate all relative
references for files in the following directories based on the value
of $CATALINA_BASE instead of $CATALINA_HOME:
bin - Only setenv.sh (*nix), setenv.bat (windows) and tomcat-juli.jar
conf - Server configuration files (including server.xml)
logs - Log and output files
webapps - Automatically loaded web applications
work - Temporary working directories for web applications
temp - Directory used by the JVM for temporary files (java.io.tmpdir)
Note that by default Tomcat will first try to load classes and JARs
from $CATALINA_BASE/lib and then $CATALINA_HOME/lib. You can place
instance specific JARs and classes (e.g. JDBC drivers) in
$CATALINA_BASE/lib whilst keeping the standard Tomcat JARs in
$CATALINA_HOME/lib.
If you do not set $CATALINA_BASE, $CATALINA_BASE will default to the
same value as $CATALINA_HOME, which means that the same directory is
used for all relative path resolutions.