forked from palazzem/archlinux-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
24 lines (20 loc) · 938 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM docker.io/archlinux:base-devel
ENV NAME=arch-toolbox VERSION=rolling
LABEL com.github.containers.toolbox="true" \
com.github.debarshiray.toolbox="true" \
name="$NAME" \
version="$VERSION" \
usage="This image is meant to be used with the toolbox command" \
summary="Base image for creating Arch toolbox containers" \
maintainer="Emanuele Palazzetti <emanuele.palazzetti@gmail.com>"
# Install required dependencies to run `toolbox`
RUN pacman -Syyu sudo git vim --noconfirm && \
pacman -Scc --noconfirm
# Required steps otherwise `toolbox` fails to start the container:
# 1. machine-id must be present in the base image
# 2. $(whoami) must be in the sudoer list without password
# 3. /media must be present (toolbox tries to remove the folder and create a symlink)
RUN touch /etc/machine-id && \
echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/toolbox && \
mkdir /media
CMD /bin/sh