Skip to content

Commit

Permalink
default to native platform when creating container
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Honton authored and rohanKanojia committed Feb 22, 2023
1 parent f3849b4 commit 920fde8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ public String createExecContainer(String containerId, Arguments arguments) throw
public String createContainer(ContainerCreateConfig containerConfig, String containerName)
throws DockerAccessException {
String createJson = containerConfig.toJson();
String url = urlBuilder.createContainer(containerName, containerConfig.getPlatform());
String requestedPlatform = containerConfig.getPlatform();
if (requestedPlatform == null) {
requestedPlatform = nativePlatform;
}
String url = urlBuilder.createContainer(containerName, requestedPlatform);
log.verbose(Logger.LogVerboseCategory.API, API_LOG_FORMAT_POST_WITH_REQUEST, url, createJson);
try {
String response =
Expand Down

0 comments on commit 920fde8

Please sign in to comment.