Arch Setup

From bibbleWiki
Jump to navigation Jump to search

Introduction

This page is about providing information around setting up Arch Linux. I have chosen to use this as opposed to Ubuntu because it is a lot smaller and seems to be a popular choice

Pacman (apt for Arch Linux)

So here are the commands for pacman

Install

Remove

pacman -R package_name

List

Purge

Search

Docker File

This is my base Docker for Archlinux

FROM archlinux:latest
LABEL org.opencontainers.image.authors="iwiseman@bibble.co.nz"

# Update the repositories
RUN pacman -Sy --noconfirm

# Install openssh etc...
RUN pacman -S  --noconfirm openssh which

# Install dovecot
RUN pacman -S  --noconfirm dovecot

# Make service directory
RUN mkdir -p /var/run/sshd

# Change root password
RUN echo "root:root" | chpasswd

# Generate host keys
RUN /usr/bin/ssh-keygen -A

# Fix sshd
RUN sed -i  's/#\?PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config

# Expose tcp port
EXPOSE	 22

# Run openssh daemon
CMD	 ["/usr/sbin/sshd", "-D"]