Update build-linux.yml and Dockerfile for environment improvements and AWS CLI installation

This commit is contained in:
Max 2024-11-29 13:37:06 +08:00
parent d176ef904d
commit dc43e9ca4f
2 changed files with 14 additions and 13 deletions

View file

@ -19,11 +19,6 @@ jobs:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
steps:
- name: Install AWS CLI
run: |
apt-get update
apt-get install -y awscli
- name: Configure R2 For Cloudflare
run: |
aws configure set aws_access_key_id $CF_ACCESS_KEY_ID

View file

@ -1,5 +1,5 @@
# ===========================================
# Yao Build Environment (Ubuntu 23.04 AMD64)
# Yao Build Environment (Ubuntu 24.04 AMD64)
#
# Build:
# docker build --platform linux/amd64 -t yaoapp/yao-build:0.10.4 .
@ -12,7 +12,7 @@
# docker run --rm -it -v ./test:/data yaoapp/yao-build:0.10.4 /bin/bash
#
# ===========================================
FROM ubuntu:23.04
FROM ubuntu:24.04
WORKDIR /app
ADD build.sh /app/build.sh
ENV PATH=$PATH:/usr/local/go/bin:/root/go/bin
@ -29,18 +29,24 @@ RUN apt-get update && \
apt-get install -y git && \
apt-get install -y unzip
RUN wget https://golang.org/dl/go1.21.1.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz && \
rm go1.21.1.linux-amd64.tar.gz
# Install Go 1.23.3
RUN wget https://golang.org/dl/go1.23.3.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.23.3.linux-amd64.tar.gz && \
rm go1.23.3.linux-amd64.tar.gz
# Install Node.js 18.x
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
RUN npm install -g pnpm
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
apt-get install -y git-lfs && \
git lfs install
# Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip && \
rm -rf aws && \
aws --version
# RUN npm install -g pnpm
RUN chmod +x /app/build.sh