This commit is contained in:
parent
422bab9f1c
commit
24934f7b79
3 changed files with 50 additions and 3 deletions
37
.woodpecker.yml
Normal file
37
.woodpecker.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
steps:
|
||||||
|
- name: build devel-base
|
||||||
|
image: docker.io/library/docker:25-cli
|
||||||
|
secrets: [user, pass]
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- REGISTRY="dev.cat-enby.club"
|
||||||
|
- docker buildx build -t $${REGISTRY}/$CI_REPO_OWNER/devel-base:trixie -t $${REGISTRY}/$CI_REPO_OWNER/devel-base:latest -f ./devel-base/Dockerfile .
|
||||||
|
- docker login --username $USER --password $PASS $${REGISTRY}
|
||||||
|
- docker push $${REGISTRY}/$CI_REPO_OWNER/devel-base:trixie
|
||||||
|
- docker push $${REGISTRY}/$CI_REPO_OWNER/devel-base:latest
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
- event: cron
|
||||||
|
cron: weekly
|
||||||
|
- name: build devel-node
|
||||||
|
image: docker.io/library/docker:25-cli
|
||||||
|
secrets: [user, pass]
|
||||||
|
commands:
|
||||||
|
- apk add git
|
||||||
|
- REGISTRY="dev.cat-enby.club"
|
||||||
|
- NODE_LTS=$(curl -s https://nodejs.org/dist/index.json | jq -r '.[] | select(.lts) | .version' | head -n 1 | sed 's/v//')
|
||||||
|
- PNPM_VERSION=$(curl -s https://registry.npmjs.org/pnpm | jq -r '.["dist-tags"].latest')
|
||||||
|
- docker buildx build -t $${REGISTRY}/$CI_REPO_OWNER/devel-node:$${NODE_LTS}-$${PNPM_VERSION} -t $${REGISTRY}/$CI_REPO_OWNER/devel-node:latest -f ./devel-node/Dockerfile --build-arg NODE_VERSION=$${NODE_LTS} --build-arg PNPM_VERSION=$${PNPM_VERSION} .
|
||||||
|
- docker login --username $USER --password $PASS $${REGISTRY}
|
||||||
|
- docker push $${REGISTRY}/$CI_REPO_OWNER/devel-node:$${NODE_LTS}-$${PNPM_VERSION}
|
||||||
|
- docker push $${REGISTRY}/$CI_REPO_OWNER/devel-node:latest
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: main
|
||||||
|
- event: cron
|
||||||
|
cron: weekly
|
|
@ -1,14 +1,17 @@
|
||||||
FROM docker.io/library/rust:1-bookworm as RUST_BUILD
|
FROM docker.io/library/rust:1-bookworm as RUST_BUILD
|
||||||
RUN apt-get update -y && apt-get install cmake -y &&\
|
RUN apt-get update -y && apt-get install cmake -y &&\
|
||||||
cargo install starship --locked &&\
|
cargo install starship --locked &&\
|
||||||
cargo install eza --locked
|
cargo install eza --locked &&\
|
||||||
|
cargo install zoxide --locked
|
||||||
|
|
||||||
FROM docker.io/debian:trixie
|
FROM docker.io/debian:trixie
|
||||||
ARG USER="developer"
|
ARG USER="developer"
|
||||||
RUN apt-get update -y && apt-get install -y build-essential curl git && apt-get clean && for dir in apt dpkg;do rm -r /var/lib/$dir;done &&\
|
RUN apt-get update -y && apt-get install -y build-essential curl git && apt-get clean && rm -r /var/lib/apt/lists/* &&\
|
||||||
useradd -u 1000 -mU -s $(which bash) $USER &&\
|
useradd -u 1000 -mU -s $(which bash) $USER &&\
|
||||||
runuser -l $USER -c 'mkdir /home/$USER/.config && curl -fsSLo /home/$USER/.config/starship.toml https://dev.cat-enby.club/Nikurasu/dotfiles/raw/branch/main/starship/starship.toml' &&\
|
runuser -l $USER -c 'mkdir /home/$USER/.config && curl -fsSLo /home/$USER/.config/starship.toml https://dev.cat-enby.club/Nikurasu/dotfiles/raw/branch/main/starship/starship.toml' &&\
|
||||||
echo 'eval "$(starship init bash)"' >> /home/$USER/.bashrc &&\
|
echo 'eval "$(starship init bash)"' >> /home/$USER/.bashrc &&\
|
||||||
|
echo 'eval "$(zoxide init bash)"' >> /home/$USER/.bashrc &&\
|
||||||
curl -fsSL https://dev.cat-enby.club/Nikurasu/dotfiles/raw/branch/main/shell/alias/eza >> /home/$USER/.bashrc
|
curl -fsSL https://dev.cat-enby.club/Nikurasu/dotfiles/raw/branch/main/shell/alias/eza >> /home/$USER/.bashrc
|
||||||
COPY --from=RUST_BUILD /usr/local/cargo/bin/starship /usr/local/bin/starship
|
COPY --from=RUST_BUILD /usr/local/cargo/bin/starship /usr/local/bin/starship
|
||||||
COPY --from=RUST_BUILD /usr/local/cargo/bin/eza /usr/local/bin/eza
|
COPY --from=RUST_BUILD /usr/local/cargo/bin/eza /usr/local/bin/eza
|
||||||
|
COPY --from=RUST_BUILD /usr/local/cargo/bin/zoxide /usr/local/bin/zoxide
|
||||||
|
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
devcontainer:
|
||||||
|
image: dev.cat-enby.club/cat-enby-club/devel-base:latest
|
||||||
|
volumes:
|
||||||
|
- ../..:/workspaces:cached
|
||||||
|
command: sleep infinity
|
Loading…
Reference in a new issue