jenkins-with-docker/Dockerfile
Andreas Fahrecker 6eca980c68
Some checks failed
andreas-personal/jenkins-with-docker/pipeline/head There was a failure building this commit
Added Flutter to non alpine-image
2024-03-12 18:17:46 +01:00

43 lines
1.3 KiB
Docker

FROM jenkins/jenkins:latest
USER root
RUN groupadd -g 281 docker
RUN usermod -aG docker jenkins
RUN apt-get update
RUN apt-get install -y\
ca-certificates \
curl \
gnupg
RUN mkdir -m 0755 -p /etc/apt/keyrings
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update
RUN apt-get install -y docker-ce-cli
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
# Install flutter
RUN apt update
RUN apt install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback lib32stdc++6 python3 sed
RUN apt clean
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
RUN git config --global --add safe.directory /usr/local/flutter
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
# Install jenkins plugins
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"
# Run flutter upgrade
RUN flutter doctor -v
RUN flutter channel master
RUN flutter upgrade