Skip to content

Commit

Permalink
refactor(#89): swap Antergos image base to vanilla Arch Linux
Browse files Browse the repository at this point in the history
closes #89
  • Loading branch information
meatwallace committed May 23, 2019
1 parent 677f99c commit 3281bc1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
3 changes: 1 addition & 2 deletions scripts/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN \
gnupg \
sudo >/dev/null && \
# add our user account & set the password
adduser -D -s /bin/bash "${MEATBOX_USER}" users && \
adduser -D -s /bin/zsh "${MEATBOX_USER}" users && \
echo "${MEATBOX_USER}:${MEATBOX_PASSWORD}" | chpasswd && \
# add a sudo config file that allows our user to use `sudo`
echo "${MEATBOX_USER} ALL=(ALL) ALL" | tee -a "/etc/sudoers.d/${USER_SUDOERS_FILE}" && \
Expand All @@ -34,7 +34,6 @@ RUN \
# swap into our user account
USER "${MEATBOX_USER}"
SHELL ["/bin/bash", "-c"]
# WORKDIR "/home/${MEATBOX_USER}"

# we prevent caching of our setup script by injecting our current commit SHA1 here
ARG MEATBOX_CHECKOUT_SHA1
Expand Down
2 changes: 1 addition & 1 deletion scripts/alpine/install_or_update_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -eu
packages="$(grep -v '^\#' ./APKFile | grep .)"

# shellcheck disable=SC2086
sudo apk add --no-cache $packages #>/dev/null 2>&1
sudo apk add --no-cache $packages >/dev/null
2 changes: 1 addition & 1 deletion scripts/alpine/run-x11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ x11docker \
--privileged \
--cap-add=ALL \
-- \
meatwallace/meatbox-alpine:latest awesome
meatwallace/meatbox-alpine:latest "/home/$USER/.xinitrc"

# --hostdisplay \
# --xorg
Expand Down
2 changes: 1 addition & 1 deletion scripts/alpine/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ update_package_configuration.sh

setup() {
for script in $scripts; do
"./$script" # >/dev/null
"./$script" >/dev/null
done
}

Expand Down
11 changes: 6 additions & 5 deletions scripts/arch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###############################################################################
# meatwallace/meatbox-arch
###
FROM antergos/archlinux-base-devel:latest
FROM archlinux/base:latest

# specific to antergos setup when using the `base` installation
ARG USER_SUDOERS_FILE="10-user"
Expand All @@ -12,9 +12,11 @@ ARG MEATBOX_PASSWORD
ARG MEATBOX_SETUP_SUDOERS_FILE="20-setup"

RUN \
# add our user account and set a passwordf
useradd -m -g users -G wheel -s /bin/bash "${MEATBOX_USER}" && \
echo "${MEATBOX_USER}:${MEATBOX_PASSWORD}" | chpasswd && \
# add core dependencies - includes the kernel, bash, gnu *utils, shadow, sudo
pacman -Sy --noconfirm --needed base base-devel git zsh >/dev/null && \
# add our user account and set a passwordf
useradd -m -g users -G wheel -s /bin/zsh "${MEATBOX_USER}" && \
echo "${MEATBOX_USER}:${MEATBOX_PASSWORD}" | chpasswd && \
# add a sudoers config allowing our user to use `sudo` and fix permissions
echo "${MEATBOX_USER} ALL=(ALL) ALL" | tee -a "/etc/sudoers.d/${USER_SUDOERS_FILE}" && \
chmod 0440 "/etc/sudoers.d/${USER_SUDOERS_FILE}" && \
Expand All @@ -27,7 +29,6 @@ RUN \
# swap into our user account
USER "${MEATBOX_USER}"
SHELL ["/bin/bash", "-c"]
WORKDIR "/home/${MEATBOX_USER}"

# we prevent caching of our setup script by injecting our current commit SHA1 here
ARG MEATBOX_CHECKOUT_SHA1
Expand Down
2 changes: 1 addition & 1 deletion scripts/arch/run-x11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ x11docker \
--privileged \
--cap-add=ALL \
-- \
meatwallace/meatbox-arch:latest /usr/bin/xinitrcsession-helper
meatwallace/meatbox-alpine:latest "/home/$USER/.xinitrc"

# --hostdisplay \
# --xorg
Expand Down

0 comments on commit 3281bc1

Please sign in to comment.