Skip to content

Commit

Permalink
Add Dockerfile, build Docker image in CI
Browse files Browse the repository at this point in the history
Deploy to ghcr.io
  • Loading branch information
mmore500 committed Feb 13, 2024
1 parent 5130487 commit ed1f231
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@ jobs:
- name: Run tests
run: |
./run_tests
docker-build:
name: Docker Image Build
runs-on: ubuntu-22.04
needs: tests
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Build and Push to GitHub Container Registry
uses: docker/build-push-action@v1
with:
push: true
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
repository: devosoft/avida
registry: ghcr.io
add_git_labels: true
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:22.04

# Install necessary packages
RUN apt-get update && apt-get install -y \
git \
cmake \
g++ \
make \
ccache \
libncurses5-dev \
&& rm -rf /var/lib/apt/lists/*

COPY . /avida
WORKDIR "/avida"

RUN git submodule update --init --recursive

# Build Avida
RUN ./build_avida

# Set Avida executable as entrypoint
ENTRYPOINT ["/avida/cbuild/work/avida"]

0 comments on commit ed1f231

Please sign in to comment.