Socket
Book a DemoInstallSign in
Socket

@sosy/nx-docker-build-plugin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sosy/nx-docker-build-plugin - npm Package Compare versions

Comparing version

to
0.0.2

2

package.json
{
"name": "@sosy/nx-docker-build-plugin",
"version": "0.0.1",
"version": "0.0.2",
"private": false,

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -7,5 +7,6 @@ "use strict";

return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { dockerContext = '.', dockerFile = 'Dockerfile', buildArgs = [], push = false, image, tag } = options;
const buildTag = tag && tag.length > 0 ? `${image}:${tag}` : image;
const kanikoArgs = [
const { name, dockerContext = '.', dockerFile = 'Dockerfile', buildArgs = [], push = false, imagePrefix, tag } = options;
const imageTag = tag && tag.length > 0 ? tag : 'latest';
const buildTag = `${imagePrefix}${name}:${imageTag}`;
const dockerBuildArgs = [
'build',

@@ -17,6 +18,6 @@ `${dockerContext}`,

buildArgs.forEach((arg) => {
kanikoArgs.push(`--build-arg=${arg}`);
dockerBuildArgs.push(`--build-arg=${arg}`);
});
console.log('Creating docker image:', options);
let code = yield utils_1.spawnChildProcess(`docker`, kanikoArgs);
let code = yield utils_1.spawnChildProcess(`docker`, dockerBuildArgs);
console.log('Build finished');

@@ -23,0 +24,0 @@ if (code === 0 && push) {

@@ -5,3 +5,4 @@ export interface BuildExecutorSchema {

app: string;
image: string;
name: string;
imagePrefix: string;
tag: string;

@@ -8,0 +9,0 @@ push: boolean;

@@ -16,5 +16,5 @@ {

},
"image": {
"imagePrefix": {
"type": "string",
"description": "The name of the docker image."
"description": "The prefix of the docker image."
},

@@ -21,0 +21,0 @@ "app": {

Sorry, the diff of this file is not supported yet