Skip to content

Commit e76296d

Browse files
committed
Dockerfile: cleanup and add en_US.UTF-8 locale
Closes #84 Closes #83 Thanks @xMrWhite, @frol and @sr229.
1 parent 58d322b commit e76296d

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/CODEOWNERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
* @coderasher @kylecarbs
1+
* @coderasher @kylecarbs
2+
Dockerfile @nhooyr

Dockerfile

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,32 @@
11
FROM node:8.15.0
22

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

78
# Ensure latest yarn.
8-
RUN npm install -g yarn
9+
RUN npm install -g yarn@1.13
910

10-
# In the future, we can use https://github.com/yarnpkg/rfcs/pull/53 to make it use the node_modules
11-
# directly which should be faster.
1211
WORKDIR /src
1312
COPY . .
14-
RUN yarn
15-
RUN yarn task build:server:binary
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
1617

1718
# We deploy with ubuntu so that devs have a familiar environemnt.
1819
FROM ubuntu:18.10
19-
RUN apt-get update
20-
RUN apt-get install -y openssl
21-
RUN apt-get install -y net-tools
2220
WORKDIR /root/project
2321
COPY --from=0 /src/packages/server/cli-linux /usr/local/bin/code-server
2422
EXPOSE 8443
23+
RUN apt-get update && apt-get install -y \
24+
openssl \
25+
net-tools
26+
RUN apt-get install -y locales && \
27+
locale-gen en_US.UTF-8
28+
# We unfortunately cannot use update-locale because docker will not use the env variables
29+
# configured in /etc/default/locale so we need to set it manually.
30+
ENV LANG=en_US.UTF-8
2531
# Unfortunately `.` does not work with code-server.
2632
CMD code-server $PWD

0 commit comments

Comments
 (0)