Skip to content

Commit

Permalink
add Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
DennyDai committed Feb 27, 2024
1 parent 7454e0f commit e1cec1f
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
tags:
- '*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
Publish:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
git wget \
virtualenvwrapper python3-dev python3-pip python-is-python3 python3-venv \
clang-15 lld-15 \
qemu-user \
libc6-armhf-cross libc6-arm64-cross \
libc6-mips-cross libc6-mips64-cross \
libc6-powerpc-cross libc6-powerpc-ppc64-cross \
libc6-mipsel-cross libc6-mips64el-cross \
libc6-ppc64el-cross \
&& rm -rf /var/lib/apt/lists/*

COPY . /patcherex2
WORKDIR /patcherex2

RUN pip install -U pip pytest ruff
RUN pip install -e /patcherex2

CMD ["/bin/bash"]

0 comments on commit e1cec1f

Please sign in to comment.