# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # FROM node:16.9 ARG TINI_VERSION=v0.19.0 RUN curl -Lo /usr/local/bin/tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 \ && chmod +x /usr/local/bin/tini # -------------------------------------------------------------------------- # Install and configure sshd. # https://docs.docker.com/engine/examples/running_ssh_service for reference. # -------------------------------------------------------------------------- RUN apt-get update \ && apt-get install -y openssh-server jq \ && mkdir -p /var/run/sshd EXPOSE 22 # ---------------------------------------- # Install GitLab CI required dependencies. # ---------------------------------------- ARG GITLAB_RUNNER_VERSION RUN curl -Lo /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/v${GITLAB_RUNNER_VERSION}/binaries/gitlab-runner-linux-amd64 \ && chmod +x /usr/local/bin/gitlab-runner RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ && apt-get install git-lfs \ && git lfs install --skip-repo # ------------------------------------------------------------------------------------- # Execute a startup script. # https://success.docker.com/article/use-a-script-to-initialize-stateful-container-data # for reference. # ------------------------------------------------------------------------------------- COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh ENTRYPOINT ["tini", "--", "/usr/local/bin/docker-entrypoint.sh"]