-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (30 loc) · 829 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (30 loc) · 829 Bytes
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
FROM quay.io/fedora/fedora:43
ARG TARGETPLATFORM
ARG IMG_USR=bob
ARG UID=1000
RUN dnf install -y \
curl \
fd-find \
file \
git \
netcat \
ripgrep \
stow \
tree-sitter-cli \
&& dnf clean all
RUN PLATFORM=$( \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then echo "linux-x86_64"; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then echo "linux-arm64"; \
fi \
) && \
echo "PLATFORM=$PLATFORM" >> /etc/environment
RUN source /etc/environment && \
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-${PLATFORM}.tar.gz && \
tar --strip-components=1 -C /usr/local -xzf nvim-${PLATFORM}.tar.gz && \
rm nvim-${PLATFORM}.tar.gz
RUN useradd --uid ${UID} -m ${IMG_USR}
USER ${IMG_USR}:${IMG_USR}
WORKDIR /home/${IMG_USR}/.dotfiles
COPY . .
WORKDIR /home/${IMG_USR}/code
CMD ["bash"]