UNPKG

@aivec/wp-docker-dev-factory

Version:

Spin up local WordPress environments with Docker.

20 lines (19 loc) 626 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.save = exports.imageExists = void 0; var child_process_1 = require("child_process"); var utils_1 = require("../utils"); var imageExists = function (image) { try { (0, child_process_1.execSync)("docker image inspect ".concat(image), { stdio: 'pipe' }); return true; } catch (error) { return false; } }; exports.imageExists = imageExists; var save = function (tarPath, savedImage) { return (0, utils_1.execp)("docker image save -o ".concat(tarPath, " ").concat(savedImage)); }; exports.save = save;