Hi there!
I am trying to get a java quarkus app build, which in turn builds a docker image.
I would like to use the circleci image “cimg/openjdk:17.0” for this as it seems to check all the boxes in terms of software installed (java 17, maven 3.8.5, docker).
The build however fails when the quarkus java build tries to find/access docker in order to build the docker image itself:
[WARNING] Attempted to read Testcontainers configuration file at file:/home/circleci/.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: /home/circleci/.testcontainers.properties (No such file or directory)
[INFO] docker-machine executable was not found on PATH ([/opt/sbt/bin, /opt/gradle/bin, /opt/apache-maven/bin, /home/circleci/bin, /home/circleci/.local/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin])
[ERROR] Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
[ERROR] UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
[ERROR] As no valid configuration was found, execution cannot continue
[WARNING] [io.quarkus.deployment.IsDockerWorking] Could not determine version of Docker daemon
This is my circleci script in use:
version: 2
jobs:
build:
docker:
- image: cimg/openjdk:17.0
working_directory: ~/repo
environment:
MAVEN_OPTS: -Xmx6400m
steps:
## Checkout the source code
- checkout
## Restore any files that may have been cached from previous jobs
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
## cache the dependencies
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
- run:
name: Set permissions
command: chmod +x mvnw
- run:
name: Run unit tests
command: ./mvnw test
- run:
name: Build docker image
command: ./mvnw package '-Dquarkus.container-image.build=true'
Anyone an idea how to fix this?