File tree 2 files changed +33
-12
lines changed
2 files changed +33
-12
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:stretch
2
- WORKDIR /app
3
- RUN apt-get update \
4
- && apt-get install -y wget net-tools vim rsync \
5
- && rm -rf /var/lib/apt/lists/*
6
- RUN wget https://github.com/$(wget https://github.com/codercom/code-server/releases/latest -O - | egrep '/.*/.*-linux.tar.gz' -o) \
7
- && tar -xvzf * \
8
- && cd * \
9
- && chmod +x code-server \
10
- && mv ./code-server /
1
+ FROM node:8.15.0
2
+
3
+ # Install VS Code's deps. These are the only two it seems we need.
4
+ RUN apt-get update && apt-get install -y \
5
+ libxkbfile-dev \
6
+ libsecret-1-dev
7
+
8
+ # Ensure latest yarn.
9
+ RUN npm install -g
[email protected]
11
10
11
+ WORKDIR /src
12
+ COPY . .
13
+
14
+ # In the future, we can use https://github.com/yarnpkg/rfcs/pull/53 to make yarn use the node_modules
15
+ # directly which should be fast as it is slow because it populates its own cache every time.
16
+ RUN yarn && yarn task build:server:binary
17
+
18
+ # Use golang base dev for go development tooling
19
+ FROM golang:stretch
20
+ WORKDIR /root/project
21
+ COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
12
22
EXPOSE 8443
13
- CMD /code-server -p 8443
23
+ RUN apt-get update && apt-get install -y \
24
+ openssl \
25
+ net-tools \
26
+ vim \
27
+ rsync
28
+ RUN apt-get install -y locales && \
29
+ locale-gen en_US.UTF-8
30
+ # We unfortunately cannot use update-locale because docker will not use the env variables
31
+ # configured in /etc/default/locale so we need to set it manually.
32
+ ENV LANG=en_US.UTF-8
33
+ # Unfortunately `.` does not work with code-server.
34
+ CMD code-server $PWD
Original file line number Diff line number Diff line change 61
61
- image : stevesloka/code-server
62
62
imagePullPolicy : Always
63
63
name : code-server
64
- command : ["/ code-server"]
64
+ command : ["code-server"]
65
65
args :
66
66
- /go/src
67
67
- --allow-http
You can’t perform that action at this time.
0 commit comments