-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
27 lines (21 loc) · 857 Bytes
/
Dockerfile.dev
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
# Create a build image with wget and unzip
FROM ubuntu:latest as pmd_builder
# Install wget and unzip
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget unzip
RUN wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.0.0/pmd-dist-7.0.0-bin.zip --no-check-certificate
RUN unzip pmd-dist-7.0.0-bin.zip
FROM ruby:3.3-bullseye
# Install git and java JDK
RUN apt-get update; \
apt-get install -y --no-install-recommends \
git openjdk-17-jdk
# copy PMD from build image
COPY --from=pmd_builder /pmd-bin-7.0.0 /usr/local/bin/pmd-bin-7.0.0
# make pmd available in the PATH
RUN ln -s /usr/local/bin/pmd-bin-7.0.0/bin/pmd /usr/local/bin/pmd
COPY *.gemspec Gemfile* ./
COPY lib/churn_vs_complexity/version.rb lib/churn_vs_complexity/version.rb
RUN bundle install
CMD ["/bin/sh", "-c", "echo 'It works!'"]