-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-fedora
37 lines (29 loc) · 1.7 KB
/
Dockerfile-fedora
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
FROM devshell
# see ./container/devshell
COPY dnf-install.sh /tmp/
RUN /tmp/dnf-install.sh
# TODO Replace this with a ~vorburger/.ssh/ volume mount (like in git-server/Dockerfile)
# authorized_keys.sh does something similar
ADD https://www.vorburger.ch/gpg/ssh-authorized_keys /tmp/vorburger.ch_keys
ADD https://github.com/vorburger.keys /tmp/vorburger_github_keys
RUN /usr/local/sbin/add-uid-key vorburger /bin/bash "$(cat /tmp/vorburger.ch_keys /tmp/vorburger_github_keys)"
USER vorburger
WORKDIR /home/vorburger/
RUN mkdir -p dev/vorburger-dotfiles-bin-etc
# This is slower than the rest, so do this first so that's cached and skipped when make other changes
COPY --chown=vorburger:vorburger git-install.sh install-nano.sh /tmp/
RUN /tmp/git-install.sh /tmp/install-nano.sh && rm /tmp/git-install.sh /tmp/install-nano.sh
# TODO see TODO.MD: "clone" to ~/.git - how to COPY with .git ??)
# Do NOT do this, because then any time you touch any file during dev, it will redo above:
# COPY . /home/vorburger/dev/vorburger-dotfiles-bin-etc/
COPY --chown=vorburger:vorburger *.sh /home/vorburger/dev/vorburger-dotfiles-bin-etc/
COPY --chown=vorburger:vorburger *.fish /home/vorburger/dev/vorburger-dotfiles-bin-etc/
COPY --chown=vorburger:vorburger dotfiles/ /home/vorburger/dev/vorburger-dotfiles-bin-etc/dotfiles/
COPY --chown=vorburger:vorburger bin/ /home/vorburger/dev/vorburger-dotfiles-bin-etc/bin/
RUN /home/vorburger/dev/vorburger-dotfiles-bin-etc/all-install.sh \
&& rm /home/vorburger/.bashrc \
&& /home/vorburger/dev/vorburger-dotfiles-bin-etc/symlink.sh
COPY .git-described /etc/git-release
# We have to reset the user to root so that sshd (FROM parent images) will start (as intended)
USER root
WORKDIR /