Skip to content

Commit

Permalink
build: Install git dependency for docker build (#162)
Browse files Browse the repository at this point in the history
* build: Install git dependency for docker build

* ci: Add docker build workflow
  • Loading branch information
Jesse S authored Oct 25, 2023
1 parent 2f3e05f commit c8ef1b0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build x86 Docker Image
on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build x86 Image
run:
make image
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
push:
branches:
- '**'
pull_request:
branches:
- master

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WORKDIR /workspace/app
ENV JAVA_OPTS="-Djdk.lang.Process.launchMechanism=vfork"

COPY . /workspace/app
RUN apt-get -y update && apt-get -y install git
RUN ./gradlew clean build -x test
RUN mkdir -p build/dependency && cd build/dependency; jar -xf ../libs/*[^p][^l][^a][^i][^n].jar

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ package: clean validatedocs build
build:
./gradlew build -x test

.PHONY: image
image:
docker build -t aerospike-rest-gateway .

.PHONY: run
run:
./gradlew bootRun
Expand Down

0 comments on commit c8ef1b0

Please sign in to comment.