mirror of
https://git.suyu.dev/suyu/ci-docker.git
synced 2026-01-01 04:04:40 +01:00
Add simple clang format DockerImage
This commit is contained in:
parent
064256e0fb
commit
d145e1e709
2 changed files with 23 additions and 0 deletions
|
|
@ -1,6 +1,18 @@
|
|||
stages:
|
||||
- build
|
||||
|
||||
build linux clang format:
|
||||
stage: build
|
||||
image: docker
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
|
||||
- cd linux-clang-format
|
||||
- docker build -f Dockerfile -t ${CI_REGISTRY_IMAGE}:clangformat .
|
||||
- docker push ${CI_REGISTRY_IMAGE}:clangformat
|
||||
|
||||
|
||||
build linux x64:
|
||||
stage: build
|
||||
image: docker
|
||||
|
|
|
|||
11
linux-clang-format/Dockerfile
Executable file
11
linux-clang-format/Dockerfile
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
FROM ubuntu:20.04
|
||||
LABEL maintainer="suyu"
|
||||
# Create a user account suyu (UID 1027) that the container will run as
|
||||
RUN useradd -m -u 1027 -s /bin/bash suyu && \
|
||||
apt-get update && apt-get -y full-upgrade && \
|
||||
apt-get install -y git gpg-agent wget && \
|
||||
wget https://apt.llvm.org/llvm-snapshot.gpg.key && apt-key add ./llvm-snapshot.gpg.key && \
|
||||
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" >> /etc/apt/sources.list && \
|
||||
apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y clang-format-15 && \
|
||||
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log
|
||||
USER 1027
|
||||
Loading…
Add table
Add a link
Reference in a new issue