Skip to content

Docker issues #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
FROM node:8.9.3
FROM node:8.15.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.15.1 will not build as nexe does not support it.

https://github.com/nexe/nexe/releases


# Install VS Code's deps. These are the only two it seems we need.
RUN apt-get update && apt-get install -y \
libxkbfile-dev \
libsecret-1-dev

# Ensure latest yarn.
RUN npm install -g [email protected]

WORKDIR /src
COPY . .

# In the future, we can use https://github.com/yarnpkg/rfcs/pull/53 to make yarn use the node_modules
# directly which should be fast as it is slow because it populates its own cache every time.
RUN yarn && yarn task build:server:binary
# This takes ages and always dies in the end. :(
# RUN yarn --frozen-lockfile && yarn task build:server:binary


# Make the debugging easier - and the rebuilds faster
# and our life happier lets break up the build to sequential parts
RUN yarn --frozen-lockfile

RUN yarn task vscode:install
RUN yarn task build:copy-vscode
RUN yarn task build:web
RUN yarn task build:bootstrap-fork
RUN yarn task build:default-extensions
RUN yarn task build:server:bundle
RUN yarn task build:app:browser
RUN yarn task build:server:binary:package

# We deploy with ubuntu so that devs have a familiar environemnt.
FROM ubuntu:18.10
WORKDIR /root/project

COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server

EXPOSE 8443

RUN apt-get update && apt-get install -y \
openssl \
net-tools

RUN apt-get install -y locales && \
locale-gen en_US.UTF-8

# 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.
CMD code-server $PWD