Skip to content

Commit eae8c79

Browse files
authored
Release/v2.4.1 (#25)
* feat: docker.ts: --no-cache when rebuilding * fix: docker.ts: --timeout -> -t for compatibility * v2.4.1
1 parent 6e687a1 commit eae8c79

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code-container",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "Manage isolated Docker containers for running coding tools on different projects",
55
"main": "dist/main.js",
66
"bin": {

src/docker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function ensureDockerfile(): void {
7070
export function buildImageRaw(): boolean {
7171
const baseResult = spawnSync(
7272
"docker",
73-
["build", "-t", `${BASE_IMAGE}:${IMAGE_TAG}`, "-f", PACKAGED_DOCKERFILE, APPDATA_DIR],
73+
["build", "--no-cache", "-t", `${BASE_IMAGE}:${IMAGE_TAG}`, "-f", PACKAGED_DOCKERFILE, APPDATA_DIR],
7474
{ stdio: "inherit" }
7575
);
7676
if (baseResult.status !== 0) return false;
@@ -79,7 +79,7 @@ export function buildImageRaw(): boolean {
7979

8080
const userResult = spawnSync(
8181
"docker",
82-
["build", "-f", USER_DOCKERFILE_PATH, "-t", `${IMAGE_NAME}:${IMAGE_TAG}`, APPDATA_DIR],
82+
["build", "--no-cache", "-f", USER_DOCKERFILE_PATH, "-t", `${IMAGE_NAME}:${IMAGE_TAG}`, APPDATA_DIR],
8383
{ stdio: "inherit" }
8484
);
8585
return userResult.status === 0;
@@ -102,7 +102,7 @@ export function containerRunning(containerName: string): boolean {
102102
}
103103

104104
export function stopContainer(containerName: string): void {
105-
spawnSync("docker", ["stop", "--timeout", "3", containerName], { stdio: "inherit" });
105+
spawnSync("docker", ["stop", "-t", "3", containerName], { stdio: "inherit" });
106106
}
107107

108108
export function startContainer(containerName: string): void {

0 commit comments

Comments
 (0)