enapps-enorman commented on a change in pull request #25:
URL:
https://github.com/apache/sling-org-apache-sling-starter/pull/25#discussion_r641065151
##########
File path: pom.xml
##########
@@ -374,5 +379,17 @@
<bnd.index.generation.skip>false</bnd.index.generation.skip>
</properties>
</profile>
+ <profile>
+ <id>enableDocker-linux</id>
+ <properties>
+ <docker.skip>false</docker.skip>
+ </properties>
+ <activation>
+ <!-- Activate on Linux systems. Assume presence of docker.pid
file indicates Docker is available -->
+ <file>
+ <exists>/var/run/docker.pid</exists>
Review comment:
I suppose, but since "ci" builds appear to be always using ubuntu this
change works for those "ci" builds automatically and also works automatically
for some local builds as long as docker is in the expected location.
If there is some better way to determine if docker is available I'm all for
using that.
Would you be happier if that checked for "/var/run/docker.sock" like the
docker-maven-plugin does here:
https://github.com/fabric8io/docker-maven-plugin/blob/dd6f318a5db58eb45f8653ccbe137c9ad18df7da/src/main/java/io/fabric8/maven/docker/access/DockerConnectionDetector.java#L107
If the docker profile is activated by the presence of any of the following
(similar to DockerConnectionDetector above) would that satisfy your concerns?
1. environment variable DOCKER_HOST exists
2. unix socket "/var/run/docker.sock" exists
3. windows pipe "//./pipe/docker_engine" exists
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]