Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasy-peak committed Aug 4, 2023
1 parent 67068d5 commit f6688ac
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Linux

on: [push, pull_request]
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]

jobs:
build:
Expand All @@ -11,11 +15,6 @@ jobs:
os: [ubuntu-22.04]

steps:
# - uses: actions/checkout@v1
# - uses: xmake-io/github-action-setup-xmake@v1
# with:
# xmake-version: branch@master
# actions-cache-folder: '.xmake-cache'
- name: Installation
run: |
sudo apt-get update
Expand All @@ -35,5 +34,16 @@ jobs:
source ~/.xmake/profile
xmake build -y
xmake install -o .
cd bin
ldd cpp-freegpt-webui
ldd ./bin/cpp-freegpt-webui
- name: Docker login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build the Docker image
run: |
pwd
ls
docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/freegpt:latest
- name: Docker image push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/freegpt:latest
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:22.04

WORKDIR /app

ADD bin /app/bin
ADD cfg /app/cfg
ADD client /app/client

RUN ls /app/bin
RUN ls /app/cfg

WORKDIR /app/bin

ENTRYPOINT ["sh", "-c", "./cpp-freegpt-webui ../cfg/cpp-free-gpt.yml"]

0 comments on commit f6688ac

Please sign in to comment.