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
9 # http://www.apache.org/licenses/LICENSE-2.0
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
20 ENV DEBIAN_FRONTEND noninteractive
25 quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \
26 apt update ${quiet} && \
27 apt install -y -V ${quiet} \
39 rm -rf /var/lib/apt/lists/*
41 RUN gem install apt-dists-merge -v ">= 1.0.2"
43 RUN locale-gen en_US.UTF-8
45 RUN mkdir -p /run/sshd
46 RUN echo "StreamLocalBindUnlink yes" >> /etc/ssh/sshd_config
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
60 COPY id_rsa.pub /home/arrow/.ssh/authorized_keys
62 chown -R arrow: /home/arrow/.ssh && \
63 chmod -R og-rwx /home/arrow/.ssh
65 COPY runner.sh /home/arrow/runner.sh
67 chown -R arrow: /home/arrow/runner.sh && \
68 chmod +x /home/arrow/runner.sh