]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | # Licensed to the Apache Software Foundation (ASF) under one |
2 | # or more contributor license agreements. See the NOTICE file | |
3 | # distributed with this work for additional information | |
4 | # regarding copyright ownership. The ASF licenses this file | |
5 | # to you under the Apache License, Version 2.0 (the | |
6 | # "License"); you may not use this file except in compliance | |
7 | # with the License. You may obtain a copy of the License at | |
8 | # | |
9 | # http://www.apache.org/licenses/LICENSE-2.0 | |
10 | # | |
11 | # Unless required by applicable law or agreed to in writing, | |
12 | # software distributed under the License is distributed on an | |
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
14 | # KIND, either express or implied. See the License for the | |
15 | # specific language governing permissions and limitations | |
16 | # under the License. | |
17 | ||
18 | FROM debian:bullseye | |
19 | ||
20 | ENV DEBIAN_FRONTEND noninteractive | |
21 | ||
22 | ARG DEBUG | |
23 | ||
24 | RUN \ | |
25 | quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ | |
26 | apt update ${quiet} && \ | |
27 | apt install -y -V ${quiet} \ | |
28 | apt-utils \ | |
29 | createrepo-c \ | |
30 | devscripts \ | |
31 | gpg \ | |
32 | locales \ | |
33 | openssh-server \ | |
34 | rake \ | |
35 | rpm \ | |
36 | ruby \ | |
37 | sudo && \ | |
38 | apt clean && \ | |
39 | rm -rf /var/lib/apt/lists/* | |
40 | ||
41 | RUN gem install apt-dists-merge -v ">= 1.0.2" | |
42 | ||
43 | RUN locale-gen en_US.UTF-8 | |
44 | ||
45 | RUN mkdir -p /run/sshd | |
46 | RUN echo "StreamLocalBindUnlink yes" >> /etc/ssh/sshd_config | |
47 | ||
48 | ENV ARROW_USER arrow | |
49 | ENV ARROW_UID 10000 | |
50 | ||
51 | RUN \ | |
52 | groupadd --gid ${ARROW_UID} ${ARROW_USER} && \ | |
53 | useradd --uid ${ARROW_UID} --gid ${ARROW_UID} --create-home ${ARROW_USER} && \ | |
54 | mkdir -p /home/arrow/.gnupg /home/arrow/.ssh && \ | |
55 | chown -R arrow: /home/arrow/.gnupg /home/arrow/.ssh && \ | |
56 | chmod -R og-rwx /home/arrow/.gnupg /home/arrow/.ssh && \ | |
57 | echo "${ARROW_USER} ALL=(ALL:ALL) NOPASSWD:ALL" | \ | |
58 | EDITOR=tee visudo -f /etc/sudoers.d/arrow | |
59 | ||
60 | COPY id_rsa.pub /home/arrow/.ssh/authorized_keys | |
61 | RUN \ | |
62 | chown -R arrow: /home/arrow/.ssh && \ | |
63 | chmod -R og-rwx /home/arrow/.ssh | |
64 | ||
65 | COPY runner.sh /home/arrow/runner.sh | |
66 | RUN \ | |
67 | chown -R arrow: /home/arrow/runner.sh && \ | |
68 | chmod +x /home/arrow/runner.sh | |
69 | ||
70 | EXPOSE 22 |