when clojure -t:build uber is called from the running docker container it fails because it’s not authorized. Here is the full Stack trace:
{:clojure.main/message
"Execution error (HttpResponseException) at org.eclipse.aether.transport.http.HttpTransporter/handleStatus (HttpTransporter.java:472).\nstatus code: 401, reason phrase: Unauthorized (401)\n",
:clojure.main/triage
{:clojure.error/class org.apache.http.client.HttpResponseException,
:clojure.error/line 472,
:clojure.error/cause
"status code: 401, reason phrase: Unauthorized (401)",
:clojure.error/symbol
org.eclipse.aether.transport.http.HttpTransporter/handleStatus,
:clojure.error/source "HttpTransporter.java",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.Compiler$CompilerException,
:message "Syntax error macroexpanding at (build.clj:17:12).",
:data
{:clojure.error/phase :execution,
:clojure.error/line 17,
:clojure.error/column 12,
:clojure.error/source "build.clj"},
:at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3719]}
{:type org.eclipse.aether.resolution.ArtifactDescriptorException,
:message
"Failed to read artifact descriptor for com.datomic:datomic-pro:jar:0.9.5966",
:at
[org.apache.maven.repository.internal.DefaultArtifactDescriptorReader
loadPom
"DefaultArtifactDescriptorReader.java"
259]}
{:type org.eclipse.aether.resolution.ArtifactResolutionException,
:message
"Could not transfer artifact com.datomic:datomic-pro:pom:0.9.5966 from/to my.datomic.com (https://my.datomic.com/repo): status code: 401, reason phrase: Unauthorized (401)",
:at
[org.eclipse.aether.internal.impl.DefaultArtifactResolver
resolve
"DefaultArtifactResolver.java"
425]}
{:type org.eclipse.aether.transfer.ArtifactTransferException,
:message
"Could not transfer artifact com.datomic:datomic-pro:pom:0.9.5966 from/to my.datomic.com (https://my.datomic.com/repo): status code: 401, reason phrase: Unauthorized (401)",
:at
[org.eclipse.aether.connector.basic.ArtifactTransportListener
transferFailed
"ArtifactTransportListener.java"
52]}
{:type org.apache.http.client.HttpResponseException,
:message "status code: 401, reason phrase: Unauthorized (401)",
:at
[org.eclipse.aether.transport.http.HttpTransporter
handleStatus
"HttpTransporter.java"
472]}],
:trace
[[org.eclipse.aether.transport.http.HttpTransporter
handleStatus
"HttpTransporter.java"
472]
[org.eclipse.aether.transport.http.HttpTransporter
execute
"HttpTransporter.java"
294]
[org.eclipse.aether.transport.http.HttpTransporter
implGet
"HttpTransporter.java"
246]
[org.eclipse.aether.spi.connector.transport.AbstractTransporter
get
"AbstractTransporter.java"
68]
[org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner
runTask
"BasicRepositoryConnector.java"
457]
[org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner
run
"BasicRepositoryConnector.java"
364]
[org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1
run
"RunnableErrorForwarder.java"
75]
[org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor
execute
"BasicRepositoryConnector.java"
628]
[org.eclipse.aether.connector.basic.BasicRepositoryConnector
get
"BasicRepositoryConnector.java"
262]
[org.eclipse.aether.internal.impl.DefaultArtifactResolver
performDownloads
"DefaultArtifactResolver.java"
514]
[org.eclipse.aether.internal.impl.DefaultArtifactResolver
resolve
"DefaultArtifactResolver.java"
402]
[org.eclipse.aether.internal.impl.DefaultArtifactResolver
resolveArtifacts
"DefaultArtifactResolver.java"
229]
[org.eclipse.aether.internal.impl.DefaultArtifactResolver
resolveArtifact
"DefaultArtifactResolver.java"
207]
[org.apache.maven.repository.internal.DefaultArtifactDescriptorReader
loadPom
"DefaultArtifactDescriptorReader.java"
244]
[org.apache.maven.repository.internal.DefaultArtifactDescriptorReader
readArtifactDescriptor
"DefaultArtifactDescriptorReader.java"
175]
[org.eclipse.aether.internal.impl.DefaultRepositorySystem
readArtifactDescriptor
"DefaultRepositorySystem.java"
255]
[clojure.tools.deps.alpha.extensions.maven$read_descriptor
invokeStatic
"maven.clj"
115]
[clojure.tools.deps.alpha.extensions.maven$read_descriptor
invoke
"maven.clj"
106]
[clojure.tools.deps.alpha.extensions.maven$eval1165$fn__1166
invoke
"maven.clj"
146]
[clojure.lang.MultiFn invoke "MultiFn.java" 244]
[clojure.tools.deps.alpha$expand_deps$children_task__753$fn__755$fn__756
invoke
"alpha.clj"
405]
[clojure.tools.deps.alpha.util.concurrent$submit_task$task__389
invoke
"concurrent.clj"
35]
[clojure.lang.AFn call "AFn.java" 18]
[java.util.concurrent.FutureTask run "FutureTask.java" 264]
[java.util.concurrent.ThreadPoolExecutor
runWorker
"ThreadPoolExecutor.java"
1136]
[java.util.concurrent.ThreadPoolExecutor$Worker
run
"ThreadPoolExecutor.java"
635]
[java.lang.Thread run "Thread.java" 833]],
:cause "status code: 401, reason phrase: Unauthorized (401)",
:phase :execution}}
the container has a /tmp/.credentials file and i pass it my AWS creds as env vars.
Here is a docker container that i presume works and it uses the credentials file Docker Hub