27 lines
741 B
Docker
27 lines
741 B
Docker
FROM alpine:edge
|
|
|
|
# Change repositories
|
|
RUN printf 'https://download.nus.edu.sg/mirror/alpine/edge/main\n\
|
|
https://download.nus.edu.sg/mirror/alpine/edge/community\n\
|
|
https://download.nus.edu.sg/mirror/alpine/edge/testing\n' > /etc/apk/repositories
|
|
|
|
# Install dependencies
|
|
RUN apk --no-cache add \
|
|
doas ansible git fish build-base rsync \
|
|
cargo py3-virtualenv py3-setuptools
|
|
|
|
# Assure correct permission on /tmp
|
|
RUN chmod 1777 /tmp
|
|
|
|
# Create a test user
|
|
RUN echo 'permit nopass :wheel' > /etc/doas.d/doas.conf \
|
|
&& chmod 600 /etc/doas.d/doas.conf \
|
|
&& printf 'cuteuser\ncuteuser\n' | adduser -h /home/kawaii -s /bin/ash -G wheel kawaii
|
|
|
|
# Enter testing environment
|
|
USER kawaii
|
|
WORKDIR /home/kawaii
|
|
COPY . .
|
|
|
|
CMD ["/bin/ash"]
|