Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Use archlinuxjp/archlinux as base image
Browse files Browse the repository at this point in the history
  • Loading branch information
Kensuke Kosaka committed Mar 1, 2017
1 parent 644b116 commit 41ab0da
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
## -*- docker-image-name: "trileg/arch-base" -*-
FROM base/archlinux:latest
MAINTAINER Kensuke Kosaka <kosaka@trileg.net>
FROM archlinuxjp/archlinux:latest
MAINTAINER Kensuke Kosaka <k@trileg.net>

RUN pacman -Syy --noconfirm > /dev/null
RUN pacman -S archlinux-keyring --noconfirm > /dev/null
RUN pacman -Syu --noconfirm &> /dev/null
RUN ln -s /usr/lib/libncursesw.so.6 /usr/lib/libncursesw.so.5
RUN pacman-db-upgrade > /dev/null
RUN trust extract-compat


# Add normal user who can escalate to root without a password
RUN pacman -Syu --noconfirm base-devel &> /dev/null
COPY patches/sudoers.patch /tmp/sudoers.patch
RUN patch -u /etc/sudoers < /tmp/sudoers.patch && rm -f /tmp/sudoers.patch
RUN chown root:root /etc/sudoers && chmod 440 /etc/sudoers
RUN useradd -m -d /home/user -s /bin/bash -g users -G users,wheel user
RUN pacman -Syu --noconfirm base-devel &> /dev/null && \
patch -u /etc/sudoers < /tmp/sudoers.patch && rm -f /tmp/sudoers.patch && \
chown root:root /etc/sudoers && chmod 440 /etc/sudoers && \
useradd -m -d /home/user -s /bin/bash -g users -G users,wheel user

USER user

# INSTALL pacaur
## Install git
RUN pacman -Syu --noconfirm git > /dev/null
RUN sudo pacman -Syu --noconfirm git > /dev/null

## Install cower
USER user
RUN curl -L -o /tmp/cower.tar.gz --silent https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz && \
tar -zxvf /tmp/cower.tar.gz -C /tmp/ > /dev/null && \
cd /tmp/cower && \
Expand All @@ -30,20 +26,20 @@ RUN curl -L -o /tmp/cower.tar.gz --silent https://aur.archlinux.org/cgit/aur.git
makepkg -sri --noconfirm &> /dev/null && \
rm -rf /tmp/cower* && \
cd /
USER root

## Install expac
RUN pacman -Syu --noconfirm expac > /dev/null
RUN sudo pacman -Syu --noconfirm expac > /dev/null

# Install pacaur
USER user
RUN curl -L -o /tmp/pacaur.tar.gz --silent https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz && \
tar -zxvf /tmp/pacaur.tar.gz -C /tmp/ > /dev/null && \
cd /tmp/pacaur && \
export PATH=/usr/bin/core_perl:$PATH && \
makepkg -sri --noconfirm &> /dev/null && \
rm -rf /tmp/pacaur* && \
cd /
USER root

USER root

RUN pacman -Scc --noconfirm > /dev/null
ONBUILD RUN pacman -Syu --noconfirm &> /dev/null

0 comments on commit 41ab0da

Please sign in to comment.