Skip to content

Commit

Permalink
feat: add curl
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Jun 26, 2024
1 parent a85d6cd commit bc0a2a6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 23 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ docker pull airkro/node-lts

### Size of airkro/node-lts:tag

| Size | Tag | Features |
| ----------------------------: | :----------- | :------------------------------------------------------ |
| ![latest][latest] | latest | git / zip / docker-cli / docker-cli-compose / corepack |
| ![ssh][ssh] | ssh | tag:latest / ssh |
| ![sentry][sentry] | sentry | tag:latest / npm:@sentry/cli |
| ![python3][python3] | python3 | tag:latest / python3 / pip |
| ![cocoapods][cocoapods] | cocoapods | tag:latest / ruby / cocoapods |
| ![mp-wechat-ci][mp-wechat-ci] | mp-wechat-ci | tag:latest / npm:miniprogram-ci |
| ![mp-alipay-ci][mp-alipay-ci] | mp-alipay-ci | tag:python3 / npm:minidev |
| ![browser][browser] | browser | git / zip / ssh / corepack / playwright / Noto Sans ... |
| Size | Tag | Features |
| ----------------------------: | :----------- | :------------------------------------------------------------ |
| ![latest][latest] | latest | git / zip / curl / docker-cli / docker-cli-compose / corepack |
| ![ssh][ssh] | ssh | tag:latest / ssh |
| ![sentry][sentry] | sentry | tag:latest / npm:@sentry/cli |
| ![python3][python3] | python3 | tag:latest / python3 / pip |
| ![cocoapods][cocoapods] | cocoapods | tag:latest / ruby / cocoapods |
| ![mp-wechat-ci][mp-wechat-ci] | mp-wechat-ci | tag:latest / npm:miniprogram-ci |
| ![mp-alipay-ci][mp-alipay-ci] | mp-alipay-ci | tag:python3 / npm:minidev |
| ![browser][browser] | browser | git / zip / ssh / corepack / playwright / Noto Sans ... |

[latest]: https://flat.badgen.net/docker/size/airkro/node-lts/latest?label=
[ssh]: https://flat.badgen.net/docker/size/airkro/node-lts/ssh?label=
Expand Down
23 changes: 14 additions & 9 deletions conf/arch.dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
FROM node:lts-alpine as latest
RUN apk --no-cache --update add git zip
FROM node:lts-alpine AS latest
RUN apk --no-cache --update add git zip curl
RUN apk --no-cache --update add docker-cli docker-cli-compose

ENV PNPM_HOME=/usr/local/bin
ENV XDG_DATA_HOME=/home/.share
ENV XDG_STATE_HOME=/home/.state
ENV XDG_CACHE_HOME=/tmp/.cache
ENV PNPM_HOME=/home/.share/pnpm

RUN npm i -g npm@10 && npm i -g @antfu/ni && npm i -g corepack \
&& rm -rf /root/.npm/_cacache && npm cache clean --force \
&& corepack enable npm && corepack prepare npm@latest --activate \
&& corepack enable yarn && corepack prepare yarn@1.22.22 --activate \
&& corepack enable pnpm && corepack prepare pnpm@latest --activate

FROM latest as ssh
WORKDIR /mnt

FROM latest AS ssh
RUN apk --no-cache --update add openssh

FROM latest as sentry
FROM latest AS sentry
RUN pnpm i -g @sentry/cli

FROM latest as python3
FROM latest AS python3
RUN apk --no-cache --update add python3 py3-pip

FROM latest as cocoapods
FROM latest AS cocoapods
RUN apk add --no-cache --update ruby ruby-dev libffi-dev g++ make \
&& gem install cocoapods coding-push --no-document \
&& rm -rf /usr/lib/ruby/gems/*/cache/* \
&& apk del ruby-dev libffi-dev g++ make
RUN pod setup --allow-root

FROM latest as mp-wechat-ci
FROM latest AS mp-wechat-ci
RUN pnpm i -g miniprogram-ci

FROM python3 as mp-alipay-ci
FROM python3 AS mp-alipay-ci
RUN apk --no-cache --update add make
RUN pnpm i -g minidev
4 changes: 2 additions & 2 deletions conf/ci.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# syntax=docker/dockerfile:1.5

FROM openjdk:11 as qci_worker
FROM openjdk:11 AS qci_worker

RUN <<EOL
apt-get update
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install --no-install-recommends --fix-missing -y nodejs wget zip git python3.9 python3-pip
apt-get install --no-install-recommends --fix-missing -y nodejs zip git python3.9 python3-pip
apt-get autoclean
apt-get clean
apt-get autoremove
Expand Down
2 changes: 1 addition & 1 deletion conf/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Dockerfile:

```dockerfile
FROM airkro/ci:qci_worker as codingci
FROM airkro/ci:qci_worker AS codingci

ARG CODING_TOKEN
ARG CODING_TEAM
Expand Down
14 changes: 13 additions & 1 deletion conf/playwright.dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.5

FROM mcr.microsoft.com/playwright as browser
FROM mcr.microsoft.com/playwright AS browser

ENV PNPM_HOME=/usr/local/bin

Expand All @@ -13,6 +13,10 @@ apt-get clean
apt-get autoremove
rm -rf /var/lib/apt/lists/*

EOF

RUN <<EOF

npm i -g npm@10
npm i -g @antfu/ni
npm i -g corepack
Expand All @@ -25,10 +29,18 @@ corepack prepare npm@latest --activate
corepack prepare yarn@1.22.22 --activate
corepack prepare pnpm@latest --activate

EOF

RUN <<EOF

npm i -g @playwright/test
npm cache clean --force
pnpm i -g @playwright/test

EOF

RUN <<EOF

cat <<EOT > noto-sans.txt
https://github.com/notofonts/noto-cjk/raw/main/Sans/Variable/OTF/Mono/NotoSansMonoCJKsc-VF.otf
https://github.com/notofonts/noto-cjk/raw/main/Sans/Variable/OTF/NotoSansCJKsc-VF.otf
Expand Down

0 comments on commit bc0a2a6

Please sign in to comment.