-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
63 lines (48 loc) · 2.08 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
61
62
63
# Patrick King's homedir container
# Includes typical client utilities for percona, postgres and redis.
FROM ubuntu:24.04
ENV TZ=US/Pacific
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3008
RUN apt-get update && apt-get install --no-install-recommends -y software-properties-common \
&& apt-get install --no-install-recommends -y gpg gpg-agent \
&& apt-add-repository ppa:fish-shell/release-3 \
&& add-apt-repository ppa:neovim-ppa/stable \
&& apt-get update && apt-get install --no-install-recommends -y \
git fish vim neovim curl golang wget \
build-essential file sudo rsync dstat \
jq less sysstat fzf highlight python3 python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# hadolint ignore=DL3013
RUN pip3 install --no-cache-dir awscli --upgrade --user
RUN adduser --disabled-password --gecos '' --uid 20454 pking \
&& adduser pking sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Properly set the local
#RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
# locale-gen
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
COPY tilde/ /tmp/dotfiles/tilde/
COPY homemaker.toml /tmp/dotfiles/
RUN chown -R pking:pking /tmp/dotfiles/
# Set as my user and setup things from there
USER pking
WORKDIR /home/pking
# Get homemaker
RUN go install foosoft.net/projects/homemaker@latest
# Get my homedir
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
WORKDIR /tmp/dotfiles/
RUN /home/pking/go/bin/homemaker -clobber -variant nix -task default ./homemaker.toml ./tilde/
WORKDIR /home/pking
# For some reason this returns a non-zero exit code, so putting in `|| :` to ignore it
RUN nvim -es -u ~/.config/nvim/init.vim -i NONE -c "PlugUpdate" -c "qa" || :
# Environment Variables
ENV LANG en_US.utf8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
CMD ["fish"]