@@ -113,11 +113,11 @@ class Docker implements Serializable {
113
113
public <V> V inside (String args = ' ' , Closure<V> body ) {
114
114
docker. node {
115
115
def toRun = imageName()
116
- if (toRun != id && docker. script. " ${ shell()} " (script : " docker inspect -f . ${ id} " , returnStatus : true ) == 0 ) {
116
+ if (toRun != id && docker. script. " ${ docker. shell()} " (script : " docker inspect -f . ${ id} " , returnStatus : true ) == 0 ) {
117
117
// Can run it without registry prefix, because it was locally built.
118
118
toRun = id
119
119
} else {
120
- if (docker. script. " ${ shell()} " (script : " docker inspect -f . ${ toRun} " , returnStatus : true ) != 0 ) {
120
+ if (docker. script. " ${ docker. shell()} " (script : " docker inspect -f . ${ toRun} " , returnStatus : true ) != 0 ) {
121
121
// Not yet present locally.
122
122
// withDockerContainer requires the image to be available locally, since its start phase is not a durable task.
123
123
pull()
@@ -131,13 +131,13 @@ class Docker implements Serializable {
131
131
132
132
public void pull () {
133
133
docker. node {
134
- docker. script. " ${ shell()} " " docker pull ${ imageName()} "
134
+ docker. script. " ${ docker. shell()} " " docker pull ${ imageName()} "
135
135
}
136
136
}
137
137
138
138
public Container run (String args = ' ' , String command = " " ) {
139
139
docker. node {
140
- def container = docker. script. " ${ shell()} " (script : " docker run -d${ args != '' ? ' ' + args : ''} ${ id}${ command != '' ? ' ' + command : ''} " , returnStdout : true ). trim()
140
+ def container = docker. script. " ${ docker. shell()} " (script : " docker run -d${ args != '' ? ' ' + args : ''} ${ id}${ command != '' ? ' ' + command : ''} " , returnStdout : true ). trim()
141
141
new Container (docker, container)
142
142
}
143
143
}
@@ -156,7 +156,7 @@ class Docker implements Serializable {
156
156
public void tag (String tagName = parsedId. tag, boolean force = true ) {
157
157
docker. node {
158
158
def taggedImageName = toQualifiedImageName(parsedId. userAndRepo + ' :' + tagName)
159
- docker. script. " ${ shell()} " " docker tag ${ id} ${ taggedImageName} "
159
+ docker. script. " ${ docker. shell()} " " docker tag ${ id} ${ taggedImageName} "
160
160
return taggedImageName;
161
161
}
162
162
}
@@ -166,7 +166,7 @@ class Docker implements Serializable {
166
166
// The image may have already been tagged, so the tagging may be a no-op.
167
167
// That's ok since tagging is cheap.
168
168
def taggedImageName = tag(tagName, force)
169
- docker. script. " ${ shell()} " " docker push ${ taggedImageName} "
169
+ docker. script. " ${ docker. shell()} " " docker push ${ taggedImageName} "
170
170
}
171
171
}
172
172
@@ -183,11 +183,11 @@ class Docker implements Serializable {
183
183
}
184
184
185
185
public void stop () {
186
- docker. script. " ${ shell()} " " docker stop ${ id} && docker rm -f ${ id} "
186
+ docker. script. " ${ docker. shell()} " " docker stop ${ id} && docker rm -f ${ id} "
187
187
}
188
188
189
189
public String port (int port ) {
190
- docker. script. " ${ shell()} " (script : " docker port ${ id} ${ port} " , returnStdout : true ). trim()
190
+ docker. script. " ${ docker. shell()} " (script : " docker port ${ id} ${ port} " , returnStdout : true ). trim()
191
191
}
192
192
}
193
193
0 commit comments