From f37533579def30fa7ea83eb0e30e76d3de8f6335 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Sat, 9 Mar 2019 17:51:51 -0500 Subject: [PATCH] Fix build and Dockerfile issues (#176) * build: fix yarn corruption issues Closes #100 Thanks @zerdos * Dockerfile: add default Entrypoint and mount data dir Closes #170 Closes #78 Thanks @ay-b --- Dockerfile | 3 ++- README.md | 2 +- scripts/install-packages.ts | 5 +---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d2b7972e6..e2139cbed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,5 +28,6 @@ RUN apt-get install -y locales && \ # We unfortunately cannot use update-locale because docker will not use the env variables # configured in /etc/default/locale so we need to set it manually. ENV LANG=en_US.UTF-8 -# Unfortunately `.` does not work with code-server. +ENTRYPOINT code-server +# Unfortunately `.` does not work with code-server so we use shell form. CMD code-server $PWD diff --git a/README.md b/README.md index 53e91bbd5..42189d1f6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Try it out: ```bash -docker run -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --allow-http --no-auth +docker run -p 127.0.0.1:8443:8443 -v "${PWD}:/root/project" -v ~/.code-server:/root/.code-server codercom/code-server --allow-http --no-auth ``` - Code on your Chromebook, tablet, and laptop with a consistent dev environment. diff --git a/scripts/install-packages.ts b/scripts/install-packages.ts index ae4808ccf..9517c9c11 100644 --- a/scripts/install-packages.ts +++ b/scripts/install-packages.ts @@ -41,10 +41,7 @@ const handlePackages = async (dir: string): Promise => { const pkgDir = join(dir, pkg); const pkgJsonPath = join(pkgDir, "package.json"); if (existsSync(pkgJsonPath)) { - const ip = doInstall(pkg, pkgDir); - if (os.platform() === "win32") { - await ip; - } + const ip = await doInstall(pkg, pkgDir); } } };