File: Dockerfile

package info (click to toggle)
ruby-brotli 0.7.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196 kB
  • sloc: ansic: 600; ruby: 291; sh: 19; makefile: 4
file content (38 lines) | stat: -rw-r--r-- 767 bytes parent folder | download
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
ARG GCC_VERSION=14
FROM gcc:${GCC_VERSION}

ARG USE_SYSTEM_BROTLI=true

# Install Ruby and development dependencies
RUN apt-get update && apt-get install -y \
    git \
    libbrotli-dev \
    pkg-config \
    ruby \
    ruby-dev \
    && rm -rf /var/lib/apt/lists/*

# Verify GCC version
RUN gcc --version

# Set working directory
WORKDIR /app

# Copy source code
COPY . .

# Install bundler and dependencies
RUN gem install bundler
RUN bundle install

# Build and test
RUN if [ "${USE_SYSTEM_BROTLI}" = "true" ]; then \
        echo "Building with system Brotli" && \
        bundle exec rake compile; \
    else \
        echo "Building with vendor Brotli" && \
        bundle exec rake compile -- --enable-vendor; \
    fi
RUN bundle exec rake test

CMD ["bash"]