forked from todogroup/repolinter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update dockerfile to fix bad copying (todogroup#224)
- Loading branch information
1 parent
a5f83ee
commit 92389be
Showing
1 changed file
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,50 +10,53 @@ | |
# | ||
# docker run -t repolinter --git https://github.com/username/repo.git | ||
# | ||
FROM node:buster | ||
|
||
ARG RUNTIME_DEPS="git libicu-dev perl" | ||
ARG BUILD_DEPS="make build-essential cmake pkg-config zlib1g-dev libcurl4-openssl-dev libssl-dev libldap2-dev libidn11-dev" | ||
ARG RUNTIME_DEPS="git libicu-dev perl python3 ruby-full locales patch ruby-dev" | ||
ARG BUILD_DEPS="make autoconf automake python3-pip curl liblzma-dev build-essential cmake pkg-config zlib1g-dev libcurl4-openssl-dev libssl-dev libldap2-dev libidn11-dev" | ||
ARG NODE_VERSION="lts/fermium" | ||
|
||
FROM ruby:2.6-slim as ruby-deps | ||
ARG RUNTIME_DEPS | ||
ARG BUILD_DEPS | ||
## Image Building ## | ||
|
||
# set to always UTF8 | ||
ENV LANG=C.UTF-8 | ||
# update image | ||
RUN apt-get update && apt-get -y upgrade | ||
|
||
# Install build deps | ||
RUN apt-get update && \ | ||
apt-get install --no-install-recommends -y $RUNTIME_DEPS $BUILD_DEPS && \ | ||
gem update --system --silent | ||
# Install APT deps | ||
RUN apt-get install --no-install-recommends -y $BUILD_DEPS $RUNTIME_DEPS | ||
|
||
# Install Bundler | ||
RUN gem install bundler | ||
|
||
# Link python3 as default | ||
RUN ln -sf /usr/bin/python3 /usr/bin/python; \ | ||
ln -sf /usr/bin/pip3 /usr/bin/pip; | ||
|
||
# Configure Git | ||
RUN git config --global user.name "repolinter docker" && \ | ||
git config --global user.email "[email protected]" | ||
|
||
## Language Dependencies ## | ||
|
||
# Install ruby gems | ||
WORKDIR /app | ||
|
||
# Install ruby gems | ||
COPY Gemfile* ./ | ||
RUN bundle config path vendor/bundle && \ | ||
bundle install --jobs 4 --retry 3 | ||
|
||
# cleanup | ||
RUN apt-get remove -y $BUILD_DEPS && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
FROM python:3.9-slim as python-deps | ||
bundle install --jobs 4 --retry 3 | ||
|
||
# docutils for github-markup | ||
RUN python -m pip install --upgrade pip && \ | ||
pip install docutils | ||
|
||
FROM node:lts-slim | ||
|
||
# Copy Ruby dependencies | ||
COPY --from=ruby-deps . . | ||
COPY --from=python-deps . . | ||
pip install docutils | ||
|
||
# Install node_modules | ||
WORKDIR /app | ||
COPY package*.json ./ | ||
RUN npm install --production | ||
|
||
# cleanup | ||
RUN apt-get remove -y $BUILD_DEPS && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# move the rest of the project over | ||
COPY . . | ||
|
||
|