MCPcopy Index your code
hub / github.com/serverless/serverless / getDockerUid

Function getDockerUid

packages/serverless/lib/plugins/python/lib/docker.js:193–207  ·  view source on GitHub ↗

* Find out what uid the docker machine is using * @param {string} bindPath * @return {boolean}

(bindPath, pluginInstance)

Source from the content-addressed store, hash-verified

191 * @return {boolean}
192 */
193async function getDockerUid(bindPath, pluginInstance) {
194 const options = [
195 'run',
196 '--rm',
197 '-v',
198 `${bindPath}:/test`,
199 'alpine',
200 'stat',
201 '-c',
202 '%u',
203 '/bin/sh',
204 ]
205 const ps = await dockerCommand(options, pluginInstance)
206 return ps.stdoutBuffer.toString().trim()
207}
208
209export { buildImage, getBindPath, getDockerUid }

Callers 1

installRequirementsFunction · 0.90

Calls 1

dockerCommandFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…