Skip to content

Commit 92389be

Browse files
fix: update dockerfile to fix bad copying (#224)
1 parent a5f83ee commit 92389be

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

Dockerfile

+31-28
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,53 @@
1010
#
1111
# docker run -t repolinter --git https://github.com/username/repo.git
1212
#
13+
FROM node:buster
1314

14-
ARG RUNTIME_DEPS="git libicu-dev perl"
15-
ARG BUILD_DEPS="make build-essential cmake pkg-config zlib1g-dev libcurl4-openssl-dev libssl-dev libldap2-dev libidn11-dev"
15+
ARG RUNTIME_DEPS="git libicu-dev perl python3 ruby-full locales patch ruby-dev"
16+
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"
17+
ARG NODE_VERSION="lts/fermium"
1618

17-
FROM ruby:2.6-slim as ruby-deps
18-
ARG RUNTIME_DEPS
19-
ARG BUILD_DEPS
19+
## Image Building ##
2020

21-
# set to always UTF8
22-
ENV LANG=C.UTF-8
21+
# update image
22+
RUN apt-get update && apt-get -y upgrade
2323

24-
# Install build deps
25-
RUN apt-get update && \
26-
apt-get install --no-install-recommends -y $RUNTIME_DEPS $BUILD_DEPS && \
27-
gem update --system --silent
24+
# Install APT deps
25+
RUN apt-get install --no-install-recommends -y $BUILD_DEPS $RUNTIME_DEPS
26+
27+
# Install Bundler
28+
RUN gem install bundler
29+
30+
# Link python3 as default
31+
RUN ln -sf /usr/bin/python3 /usr/bin/python; \
32+
ln -sf /usr/bin/pip3 /usr/bin/pip;
33+
34+
# Configure Git
35+
RUN git config --global user.name "repolinter docker" && \
36+
git config --global user.email "[email protected]"
37+
38+
## Language Dependencies ##
2839

29-
# Install ruby gems
3040
WORKDIR /app
41+
42+
# Install ruby gems
3143
COPY Gemfile* ./
3244
RUN bundle config path vendor/bundle && \
33-
bundle install --jobs 4 --retry 3
34-
35-
# cleanup
36-
RUN apt-get remove -y $BUILD_DEPS && \
37-
apt-get autoremove -y && \
38-
rm -rf /var/lib/apt/lists/*
39-
40-
FROM python:3.9-slim as python-deps
45+
bundle install --jobs 4 --retry 3
4146

4247
# docutils for github-markup
4348
RUN python -m pip install --upgrade pip && \
44-
pip install docutils
45-
46-
FROM node:lts-slim
47-
48-
# Copy Ruby dependencies
49-
COPY --from=ruby-deps . .
50-
COPY --from=python-deps . .
49+
pip install docutils
5150

5251
# Install node_modules
53-
WORKDIR /app
5452
COPY package*.json ./
5553
RUN npm install --production
5654

55+
# cleanup
56+
RUN apt-get remove -y $BUILD_DEPS && \
57+
apt-get autoremove -y && \
58+
rm -rf /var/lib/apt/lists/*
59+
5760
# move the rest of the project over
5861
COPY . .
5962

0 commit comments

Comments
 (0)