-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (35 loc) · 1.28 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
FROM ubuntu:20.10 as dotfiles-base
#---------- system setup
RUN apt-get -y update
RUN apt-get -y install sudo
# XXX: need to expliiclty install tzdata non-interactively or else
# it hangs on user input in debian_install.sh script
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y install tzdata
# install apt packages first to cache this layer as it takes a long time
COPY etc/debian_install.sh /app/debian_install.sh
RUN /app/debian_install.sh
ENV HOME=/root
WORKDIR $HOME
#---------- general env setup
# add only dotfiles and setup_env script to optimize docker caching
RUN mkdir -p $HOME/.dotfiles/etc
ADD .* $HOME/.dotfiles/
ADD etc/setup_env.sh $HOME/.dotfiles/etc
# can't use the $HOME/etc symlink yet as this script creates it
RUN bash -i -c "$HOME/.dotfiles/etc/setup_env.sh"
#---------- tools image layer
ADD . $HOME/.dotfiles
FROM dotfiles-base as dotfiles-python
RUN bash -i -c "$HOME/etc/python.sh"
FROM dotfiles-base as dotfiles-js
RUN bash -i -c "$HOME/etc/js_tools.sh"
FROM dotfiles-base as dotfiles-rust
RUN bash -i -c "$HOME/etc/rust.sh"
FROM dotfiles-base as dotfiles-ruby
RUN bash -i -c "$HOME/etc/ruby.sh"
FROM dotfiles-base as dotfiles-dotnet
RUN bash -i -c "$HOME/etc/dotnet.sh"
FROM dotfiles-base as dotfiles-go
RUN bash -i -c "$HOME/etc/golang.sh"
ENTRYPOINT /bin/zsh