tidy Docker/Makefiles and config.fish
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -4,27 +4,28 @@ from ubuntu:bionic
|
||||
# (usually) Cached steps
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
# Set FAST_MODE to prevent git and upgrade
|
||||
# See bootstrap.sh
|
||||
ENV FAST_MODE="true"
|
||||
ENV WORKSPACE="$HOME/workspace"
|
||||
|
||||
# Install sudo for compatibility, git since it is skipped, make
|
||||
# Triple quiet mode (-qq implies -y, pipe to /dev/null)
|
||||
# Set Noninteractive
|
||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
|
||||
# Install sudo for compatibility, git since built-in is skipped, make
|
||||
RUN apt-get -y update \
|
||||
&& apt-get -y install sudo git make
|
||||
|
||||
# Create user with sudo priviledge
|
||||
ENV USER="test-user"
|
||||
RUN useradd --create-home -m $USER \
|
||||
&& adduser $USER sudo
|
||||
RUN echo "$USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
RUN useradd --create-home -m "$USER" \
|
||||
&& adduser "$USER" sudo
|
||||
RUN echo "$USER ALL=(ALL) NOPASSWD: ALL" \
|
||||
>> /etc/sudoers
|
||||
|
||||
# ---------------------------------------------------------------------------- #
|
||||
# Filesystem copy steps
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
# Copy dotfiles in
|
||||
ADD --chown=test-user . "$WORKSPACE/dotfiles"
|
||||
WORKDIR "$WORKSPACE/dotfiles"
|
||||
|
||||
@@ -32,7 +33,6 @@ WORKDIR "$WORKSPACE/dotfiles"
|
||||
# Install steps
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
# Run installer
|
||||
USER test-user
|
||||
RUN make install
|
||||
|
||||
@@ -40,5 +40,4 @@ RUN make install
|
||||
# Test steps
|
||||
# ---------------------------------------------------------------------------- #
|
||||
|
||||
# Run tests
|
||||
CMD ["make", "test"]
|
||||
CMD ["cd", "tests", "&&", "make"]
|
||||
|
||||
Reference in New Issue
Block a user