Fix start container script paths for windows
This commit is contained in:
parent
8dc1d1bd21
commit
5dc692809c
@ -30,15 +30,18 @@ export function generateStartKeycloakTestingContainer(params: {
|
|||||||
buildOptions: { themeName }
|
buildOptions: { themeName }
|
||||||
} = params;
|
} = params;
|
||||||
|
|
||||||
|
const keycloakThemePath = pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme", themeName).replace(/\\/g, "/");
|
||||||
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
pathJoin(keycloakThemeBuildingDirPath, generateStartKeycloakTestingContainer.basename),
|
pathJoin(keycloakThemeBuildingDirPath, generateStartKeycloakTestingContainer.basename),
|
||||||
|
|
||||||
Buffer.from(
|
Buffer.from(
|
||||||
[
|
[
|
||||||
"#!/usr/bin/env bash",
|
"#!/usr/bin/env bash",
|
||||||
"",
|
"",
|
||||||
`docker rm ${containerName} || true`,
|
`docker rm ${containerName} || true`,
|
||||||
"",
|
"",
|
||||||
`cd ${keycloakThemeBuildingDirPath}`,
|
`cd "${keycloakThemeBuildingDirPath.replace(/\\/g, "/")}"`,
|
||||||
"",
|
"",
|
||||||
"docker run \\",
|
"docker run \\",
|
||||||
" -p 8080:8080 \\",
|
" -p 8080:8080 \\",
|
||||||
@ -46,14 +49,7 @@ export function generateStartKeycloakTestingContainer(params: {
|
|||||||
" -e KEYCLOAK_ADMIN=admin \\",
|
" -e KEYCLOAK_ADMIN=admin \\",
|
||||||
" -e KEYCLOAK_ADMIN_PASSWORD=admin \\",
|
" -e KEYCLOAK_ADMIN_PASSWORD=admin \\",
|
||||||
" -e JAVA_OPTS=-Dkeycloak.profile=preview \\",
|
" -e JAVA_OPTS=-Dkeycloak.profile=preview \\",
|
||||||
` -v ${pathJoin(
|
` -v "${keycloakThemePath}":"/opt/keycloak/themes/${themeName}":rw \\`,
|
||||||
keycloakThemeBuildingDirPath,
|
|
||||||
"src",
|
|
||||||
"main",
|
|
||||||
"resources",
|
|
||||||
"theme",
|
|
||||||
themeName
|
|
||||||
)}:/opt/keycloak/themes/${themeName}:rw \\`,
|
|
||||||
` -it quay.io/keycloak/keycloak:${keycloakVersion} \\`,
|
` -it quay.io/keycloak/keycloak:${keycloakVersion} \\`,
|
||||||
` start-dev`,
|
` start-dev`,
|
||||||
""
|
""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user