-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
49 lines (34 loc) · 1.08 KB
/
Containerfile
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
# minimal alpine image pre-loaded with my dotfiles
# TODO: this is a work in progress, finish alpine setup
FROM alpine:latest
LABEL maintainer "boldandbrad <https://boldandbrad.dev>"
LABEL org.opencontainers.image.source https://github.com/boldandbrad/dotfiles
ARG user=boldandbrad
ARG group=wheel
ARG uid=1000
# install sudo and utilities
USER root
RUN \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk upgrade --no-cache && \
apk add --update --no-cache \
sudo \
git \
doas \
bash
# establish user and group
RUN \
echo "%${group} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
adduser -D -G ${group} ${user}
# addgroup ${user} docker
# clone dotfiles
ENV DOTFILES_DIR="/home/${user}/Dotfiles"
# RUN \
# git clone https://github.com/${user}/dotfiles ${DOTFILES_DIR} && \
# chown -R ${user}:${group} /home/${user}/Dotfiles
COPY ./ /home/${user}/Dotfiles
RUN chmod u+x "${DOTFILES_DIR}/unpack.sh"
USER ${user}
# RUN cd $DOTFILES_DIR && $DOTFILES_DIR/unpack.sh --auto-yes --no-clear
CMD []
ENTRYPOINT [ "/bin/ash" ]