This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name: Build and Push Docker Image to Gitea
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 19 * * *' # Daily at 2 AM UTC
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.psi.ch
|
||||
username: ${{ secrets.REPO_USER }}
|
||||
password: ${{ secrets.REPO_PASSWORD }}
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v6
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: gitea.psi.ch/DARI/claude-code
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=schedule,pattern={{date 'YYYYMMDD'}}
|
||||
latest
|
||||
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
file: ./claude-code/Dockerfile
|
||||
push: true
|
||||
addLatest: true
|
||||
addTimestamp: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
FROM ubuntu:latest
|
||||
# Install common dependencies for GUI applications
|
||||
RUN apt-get update && apt -y dist-upgrade && apt-get install -y \
|
||||
curl git \
|
||||
&& rm -rf /var/lib/apt/lists/* && apt clean
|
||||
|
||||
USER ubuntu
|
||||
ENV HOME=/home/ubuntu
|
||||
# ENV USER=appuser
|
||||
# # Set working directory for the user
|
||||
WORKDIR $HOME
|
||||
RUN ["curl", "-fsSL", "-o", "install.sh", "https://claude.ai/install.sh"]
|
||||
RUN ["/bin/bash", "install.sh"]
|
||||
ENV PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
WORKDIR /workspace
|
||||
# Default command - to be overridden by user
|
||||
CMD ["claude"]
|
||||
Reference in New Issue
Block a user