Skip to content

Commit

Permalink
Format Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ngan committed Apr 9, 2024
1 parent f199c58 commit b33ed4f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Linux

on:
push:
Expand All @@ -9,8 +9,8 @@ on:
pull_request:

jobs:
build:
name: ${{ format('Build ({0}, {1}, {2})', matrix.mysql, matrix.distribution, matrix.ruby) }}
test:
name: ${{ format('Test (Ruby {0}, MySQL {1}, {2})', matrix.ruby, matrix.mysql, matrix.distribution) }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -24,7 +24,7 @@ jobs:
ruby: "2.7.8"
steps:
- uses: actions/checkout@v4
- name: docker login
- name: Docker login
run: echo $GITHUB_TOKEN | docker login ghcr.io --username trilogy --password-stdin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
File renamed without changes.
26 changes: 20 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
ARG DISTRIBUTION=ubuntu:jammy

FROM ${DISTRIBUTION}
LABEL maintainer="[email protected]"
ARG RUBY_VERSION=3.2
# Make all apt-get commands non-interactive. Setting this as an ARG will apply to the entire
# build phase, but not leak into the final image and run phase.
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y build-essential ca-certificates wget libssl-dev default-libmysqlclient-dev clang clang-tools llvm valgrind netcat
RUN apt-get update -qq \
&& apt-get install --yes --no-install-recommends \
build-essential \
ca-certificates \
wget \
libssl-dev \
default-libmysqlclient-dev \
clang clang-tools \
llvm \
valgrind \
netcat

RUN update-ca-certificates

RUN wget https://github.com/postmodern/ruby-install/releases/download/v0.9.0/ruby-install-0.9.0.tar.gz && \
tar -xzvf ruby-install-0.9.0.tar.gz && \
cd ruby-install-0.9.0/ && \
make install
RUN wget https://github.com/postmodern/ruby-install/releases/download/v0.9.0/ruby-install-0.9.0.tar.gz \
&& tar -xzvf ruby-install-0.9.0.tar.gz \
&& cd ruby-install-0.9.0 \
&& make install

ARG RUBY_VERSION=3.2
RUN ruby-install --system ruby ${RUBY_VERSION}
RUN ruby --version

Expand Down
1 change: 1 addition & 0 deletions test/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ RUN set -eux \
# This is the final stage inwhich we copy the plugins from the test stage. Doing it this way allows
# us to not have to install the test package in the final image since we only need the plugins.
FROM mysql:${MYSQL_VERSION}-debian
LABEL maintainer="[email protected]"
COPY --from=0 /usr/lib/mysql/plugin/ /usr/lib/mysql/plugin/

0 comments on commit b33ed4f

Please sign in to comment.