Skip to content

Commit

Permalink
Stop using Ubuntu 14.04
Browse files Browse the repository at this point in the history
- run `locale-gen` to avoid "setlocale: LC_ALL: cannot change locale" and similar
    - needs `locales` package
- move to still-supported Ubuntu 18.04 image
    - image needs slightly-newer `libicu60` package
    - rename Dockerfile to match
- cherry-picked from #30729 internal branch for Ubuntu image update

nit: set locale-related environment variables to match Python default
  • Loading branch information
dougbu committed Apr 6, 2021
1 parent d634803 commit df197e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/SharedFxInstaller.targets
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
</ItemGroup>

<PropertyGroup>
<Image>ubuntu.14.04</Image>
<Image>ubuntu.18.04</Image>

<DebSharedFxDependencies>@(_DebSharedFxDependencies->'"%(Identity)": { "package_version": "%(Version)" }', ', ')</DebSharedFxDependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# Dockerfile that creates a container suitable to build dotnet-cli
FROM ubuntu:14.04
FROM ubuntu:18.04

# Misc Dependencies for build
RUN apt-get update && \
Expand All @@ -15,9 +15,10 @@ RUN apt-get update && \
sudo \
libunwind8 \
libkrb5-3 \
libicu52 \
libicu60 \
liblttng-ust0 \
libssl1.0.0 \
locales \
zlib1g \
libuuid1 \
debhelper \
Expand All @@ -29,7 +30,8 @@ RUN apt-get update && \
lldb-3.6 \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
locale-gen "en_US.UTF-8"

# Use clang as c++ compiler
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
Expand All @@ -40,6 +42,11 @@ ARG USER_ID=0
RUN useradd -m code_executor -u ${USER_ID} -g sudo
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Preset well-known locale
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# With the User Change, we need to change permissions on these directories
RUN chmod -R a+rwx /usr/local
RUN chmod -R a+rwx /home
Expand Down

0 comments on commit df197e0

Please sign in to comment.