-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and some cleanup (#57)
- Loading branch information
Showing
5 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM node:8.15.0 | ||
|
||
# Install VS Code's deps. These are the only two it seems we need. | ||
RUN apt-get update | ||
RUN apt-get install -y libxkbfile-dev libsecret-1-dev | ||
|
||
# Ensure latest yarn. | ||
RUN npm install -g yarn | ||
|
||
# In the future, we can use https://github.com/yarnpkg/rfcs/pull/53 to make it use the node_modules | ||
# directly which should be faster. | ||
WORKDIR /src | ||
COPY . . | ||
RUN yarn | ||
RUN yarn task build:server:binary | ||
|
||
# We deploy with ubuntu so that devs have a familiar environemnt. | ||
FROM ubuntu:18.10 | ||
RUN apt-get update | ||
RUN apt-get install -y openssl | ||
RUN apt-get install -y net-tools | ||
WORKDIR /root/project | ||
COPY --from=0 /src/packages/server/cli-linux /usr/local/bin/code-server | ||
EXPOSE 8443 | ||
# Unfortunately `.` does not work with code-server. | ||
CMD code-server $PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
npm install -g cross-env | ||
yarn task build:server:binary |