Skip to content

Commit

Permalink
Merge pull request #119 from ballerina-platform/docker-user-change
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisaruGuruge authored Nov 15, 2023
2 parents 911f247 + d188d0c commit cab27fe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/groovy/io/ballerina/plugin/BallerinaPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ class BallerinaPlugin implements Plugin<Project> {
}
createDockerEnvFile("$project.projectDir/docker.env")
def balPackWithDocker = """
docker run --env-file $project.projectDir/docker.env --rm --net=host --user 1000:1000 \
docker run --env-file $project.projectDir/docker.env --rm --net=host -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
Expand Down Expand Up @@ -330,7 +330,7 @@ class BallerinaPlugin implements Plugin<Project> {
ballerinaDockerTag = dockerTag
}
def balTestWithDocker = """
docker run --env-file $project.projectDir/docker.env --rm --net=host --user 1000:1000 \
docker run --env-file $project.projectDir/docker.env --rm --net=host -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
Expand Down Expand Up @@ -377,7 +377,7 @@ class BallerinaPlugin implements Plugin<Project> {
ballerinaDockerTag = dockerTag
}
def balPushWithDocker = """
docker run --env-file $project.projectDir/docker.env --rm --net=host --user 1000:1000 \
docker run --env-file $project.projectDir/docker.env --rm --net=host -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
Expand Down Expand Up @@ -437,7 +437,7 @@ class BallerinaPlugin implements Plugin<Project> {
if (buildOnDocker) {
createDockerEnvFile("$project.projectDir/docker.env")
def balTestWithDocker = """
docker run --env-file $project.projectDir/docker.env --rm --net=host --user 1000:1000 \
docker run --env-file $project.projectDir/docker.env --rm --net=host -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
Expand Down Expand Up @@ -472,7 +472,7 @@ class BallerinaPlugin implements Plugin<Project> {
if (buildOnDocker) {
project.exec {
def deleteUsingDocker = """
docker run --user 1000:1000 \
docker run -u root \
-v $parentDirectory:/home/ballerina/$parentDirectory.name \
-v $projectDirectory:/home/ballerina/$parentDirectory.name/$projectDirectory.name \
ballerina/ballerina:$ballerinaDockerTag \
Expand Down

0 comments on commit cab27fe

Please sign in to comment.