mirror of
https://github.com/licsber/Dockerfile.git
synced 2024-09-20 02:30:26 +08:00
test r4se.
This commit is contained in:
parent
280ffa85a2
commit
8297ee84d3
45
.github/workflows/r4se.yml
vendored
Normal file
45
.github/workflows/r4se.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Openwrt R4s Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
watch:
|
||||||
|
types: started
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
tags: [ 'v*.*.*' ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKERFILE: Dockerfile.r4se
|
||||||
|
REGION: cn-beijing
|
||||||
|
REGISTRY: registry.cn-beijing.aliyuncs.com
|
||||||
|
NAMESPACE: licsber
|
||||||
|
REPOSITORY: github
|
||||||
|
TAG: r4se
|
||||||
|
TAG_FULL: r4s-${{ github.sha }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout V3
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Login to ACR V1
|
||||||
|
uses: aliyun/acr-login@v1
|
||||||
|
with:
|
||||||
|
login-server: "https://${{ env.REGISTRY }}"
|
||||||
|
username: "${{ secrets.ACR_USERNAME }}"
|
||||||
|
password: "${{ secrets.ACR_PASSWD }}"
|
||||||
|
region-id: "${{ env.REGION }}"
|
||||||
|
|
||||||
|
- name: Build Image
|
||||||
|
id: build
|
||||||
|
run: |
|
||||||
|
IMAGE=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.REPOSITORY }}
|
||||||
|
echo "image=$IMAGE" >> $GITHUB_OUTPUT
|
||||||
|
docker build -t "$IMAGE:${{ env.TAG_FULL }}" --file ${{ env.DOCKERFILE }} .
|
||||||
|
|
||||||
|
- name: Push Image
|
||||||
|
run: |
|
||||||
|
docker push "${{ steps.build.outputs.image }}:${{ env.TAG_FULL }}"
|
||||||
|
docker tag "${{ steps.build.outputs.image }}:${{ env.TAG_FULL }}" "${{ steps.build.outputs.image }}:${{ env.TAG }}"
|
||||||
|
docker push "${{ steps.build.outputs.image }}:${{ env.TAG }}"
|
26
Dockerfile.r4se
Normal file
26
Dockerfile.r4se
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
FROM ubuntu:bionic-20230308
|
||||||
|
LABEL maintainer=admin@licsber.site
|
||||||
|
|
||||||
|
# https://github.com/friendlyarm/Actions-FriendlyWrt/blob/master/.github/workflows/build.yml
|
||||||
|
RUN echo $(nproc) && \
|
||||||
|
apt update > /dev/null && \
|
||||||
|
apt install -y -qq wget git > /dev/null && \
|
||||||
|
wget https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh && \
|
||||||
|
sed -i -e 's/^apt-get -y install openjdk-8-jdk/# apt-get -y install openjdk-8-jdk/g' install.sh && \
|
||||||
|
sed -i -e 's/^\[ -d fa-toolchain \]/# [ -d fa-toolchain ]/g' install.sh && \
|
||||||
|
sed -i -e 's/^cat fa-toolchain/# cat fa-toolchain/g' install.sh && \
|
||||||
|
sed -i -e 's/^tar xf fa-toolchain/# tar xf fa-toolchain/g' install.sh && \
|
||||||
|
bash install.sh && \
|
||||||
|
update-alternatives --install $(which python) python /usr/bin/python2.7 20 && \
|
||||||
|
git config --global user.name 'licsber' && \
|
||||||
|
git config --global user.email 'bot@licsber.site' && \
|
||||||
|
git clone https://github.com/friendlyarm/repo && \
|
||||||
|
cp repo/repo /usr/bin/ && \
|
||||||
|
mkdir -p ./artifact && \
|
||||||
|
apt clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
rm -rf /usr/share/dotnet /usr/local/lib/android/sdk /usr/local/share/boost /opt/ghc
|
||||||
|
|
||||||
|
USER licsber
|
||||||
|
WORKDIR /licsber
|
||||||
|
|
10
build-r4se.sh
Executable file
10
build-r4se.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DOCKERFILE=Dockerfile.r4se
|
||||||
|
REGISTRY=registry.cn-beijing.aliyuncs.com
|
||||||
|
NAMESPACE=licsber
|
||||||
|
REPOSITORY=github
|
||||||
|
TAG=r4se.manual
|
||||||
|
|
||||||
|
sudo docker build -t "$REGISTRY/$NAMESPACE/$REPOSITORY:$TAG" --file "$DOCKERFILE" .
|
||||||
|
|
Loading…
Reference in New Issue
Block a user