-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (51 loc) · 1.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM ubuntu:latest
RUN apt-get update \
# 先に言語の設定
&& apt-get -y install locales \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
RUN localedef -f UTF-8 -i en_US en_US.UTF-8
# brewに必要なパッケージを入れる
RUN apt-get -y install \
build-essential \
curl \
file \
git \
# 不要なキャッシュを削除
&& apt-get clean
# brewを使いたいのでuserという名のuserを作成
RUN groupadd -g 61000 docker \
&& useradd -g 61000 -l -m -s /bin/false -u 61000 user \
&& gpasswd -a user sudo \
&& chown -R user /usr/local
USER user
# install brew
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
ENV PATH /home/user/.linuxbrew/bin:$PATH
RUN ln -s `which gcc` `brew --prefix`/bin/gcc-9
# gcc系と必須コマンド系
RUN brew install \
gcc \
boost \
clang-format \
cmake \
colordiff \
sl \
python \
tree \
wget \
&& brew cleanup \
&& alias diff='colordiff'
# install online judge-tools and more python tools
RUN pip3 install \
online-judge-tools \
selenium \
yq
WORKDIR /usr/local/bin
RUN ln -s /home/user/.linuxbrew/bin/clang-format
# default を fishに
WORKDIR /home/user
RUN brew install fish && brew cleanup
CMD ["fish"]