-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.development
62 lines (53 loc) · 3.46 KB
/
Dockerfile.development
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM dependabot/dependabot-core
# Temporarily switch to root user in order to install packages
USER root
RUN apt-get update \
&& apt-get install -y vim strace ltrace gdb shellcheck \
&& rm -rf /var/lib/apt/lists/*
USER jenkins
RUN git config --global user.name dependabot-ci \
&& git config --global user.email no-reply@github.com
RUN curl -L -o ~/.vimrc https://github.com/hmarr/dotfiles/raw/main/vimrc-vanilla.vim && \
echo 'export PS1="[dependabot-core-dev] \w \[$(tput setaf 4)\]$ \[$(tput sgr 0)\]"' >> ~/.bashrc
ARG CODE_DIR=${HOME}/dependabot-core
COPY --chown=jenkins:jenkins common/Gemfile common/dependabot-common.gemspec ${CODE_DIR}/common/
COPY --chown=jenkins:jenkins common/lib/dependabot/version.rb ${CODE_DIR}/common/lib/dependabot/
WORKDIR ${CODE_DIR}
RUN cd common \
&& bundle install
COPY --chown=jenkins:jenkins bundler/Gemfile bundler/dependabot-bundler.gemspec ${CODE_DIR}/bundler/
COPY --chown=jenkins:jenkins cargo/Gemfile cargo/dependabot-cargo.gemspec ${CODE_DIR}/cargo/
COPY --chown=jenkins:jenkins composer/Gemfile composer/dependabot-composer.gemspec ${CODE_DIR}/composer/
COPY --chown=jenkins:jenkins docker/Gemfile docker/dependabot-docker.gemspec ${CODE_DIR}/docker/
COPY --chown=jenkins:jenkins elm/Gemfile elm/dependabot-elm.gemspec ${CODE_DIR}/elm/
COPY --chown=jenkins:jenkins git_submodules/Gemfile git_submodules/dependabot-git_submodules.gemspec ${CODE_DIR}/git_submodules/
COPY --chown=jenkins:jenkins github_actions/Gemfile github_actions/dependabot-github_actions.gemspec ${CODE_DIR}/github_actions/
COPY --chown=jenkins:jenkins go_modules/Gemfile go_modules/dependabot-go_modules.gemspec ${CODE_DIR}/go_modules/
COPY --chown=jenkins:jenkins gradle/Gemfile gradle/dependabot-gradle.gemspec ${CODE_DIR}/gradle/
COPY --chown=jenkins:jenkins hex/Gemfile hex/dependabot-hex.gemspec ${CODE_DIR}/hex/
COPY --chown=jenkins:jenkins maven/Gemfile maven/dependabot-maven.gemspec ${CODE_DIR}/maven/
COPY --chown=jenkins:jenkins npm_and_yarn/Gemfile npm_and_yarn/dependabot-npm_and_yarn.gemspec ${CODE_DIR}/npm_and_yarn/
COPY --chown=jenkins:jenkins nuget/Gemfile nuget/dependabot-nuget.gemspec ${CODE_DIR}/nuget/
COPY --chown=jenkins:jenkins python/Gemfile python/dependabot-python.gemspec ${CODE_DIR}/python/
COPY --chown=jenkins:jenkins terraform/Gemfile terraform/dependabot-terraform.gemspec ${CODE_DIR}/terraform/
COPY --chown=jenkins:jenkins lein/Gemfile lein/dependabot-lein.gemspec ${CODE_DIR}/lein/
RUN GREEN='\033[0;32m'; NC='\033[0m'; \
for d in `find ${CODE_DIR} -type f -mindepth 2 -maxdepth 2 \
-not -path "${CODE_DIR}/common/Gemfile" \
-name 'Gemfile' | xargs dirname`; do \
echo && \
echo "---------------------------------------------------------------------------" && \
echo "Installing gems for ${GREEN}$(realpath --relative-to=${CODE_DIR} $d)${NC}..." && \
echo "---------------------------------------------------------------------------" && \
cd $d && bundle install; \
done
COPY --chown=jenkins:jenkins omnibus/Gemfile omnibus/dependabot-omnibus.gemspec ${CODE_DIR}/omnibus/
RUN cd omnibus \
&& bundle install
# Make omnibus gems available to bundler in root directory
RUN echo 'eval_gemfile File.join(File.dirname(__FILE__), "omnibus/Gemfile")' > Gemfile
# Create directory for volume containing VS Code extensions, to avoid reinstalling on image rebuilds
RUN mkdir -p ~/.vscode-server ~/.vscode-server-insiders
# Declare pass-thru environment variables used for debugging
ENV LOCAL_GITHUB_ACCESS_TOKEN="" \
LOCAL_CONFIG_VARIABLES=""