Skip to content

Commit

Permalink
fixed version of Kex in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullinAM committed Feb 7, 2024
1 parent 3d38d8d commit 137b5c5
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 25 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build the Docker image
run: make all
run: make

- name: Push base
run: docker push abdullin/kex-standalone:base

- name: Push run
run: docker push abdullin/kex-standalone:run

- name: Push test
run: docker push abdullin/kex-standalone:test
- name: Push
run: docker push abdullin/kex-standalone:${{ github.event.release.tag_name }}

7 changes: 2 additions & 5 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Build `run` Docker image
run: make run

- name: Build `test` Docker image
run: make test
- name: Build Docker image
run: make
29 changes: 28 additions & 1 deletion KexStandaloneRun
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
FROM abdullin/kex-standalone:base
FROM archlinux:latest
MAINTAINER Azat Abdullin <[email protected]>

ARG version

# install required packages
USER root
RUN pacman -Syu --noconfirm \
git \
wget \
unzip \
jdk8-openjdk \
maven \
python3

# install kex scripts
COPY kex-test.sh /usr/bin
COPY kex-run.sh /usr/bin
RUN chmod a+rwx /usr/bin/kex-test.sh
RUN chmod a+rwx /usr/bin/kex-run.sh

# install kex
USER root
RUN mkdir kex
WORKDIR /home/kex
RUN wget https://github.com/vorpal-research/kex/releases/download/$version/kex-$version.zip
RUN unzip kex-$version.zip
WORKDIR /home

# prepare for run
USER root
Expand Down
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@

.PHONY: all

all: test run
VERSION=0.0.1

base:
docker build -f KexStandaloneBase -t abdullin/kex-standalone:base .
all: $(VERSION)

test: base
docker build -f KexStandaloneTest -t abdullin/kex-standalone:test .

run: base
docker build -f KexStandaloneRun -t abdullin/kex-standalone:run .
$(VERSION):
docker build --build-arg="version=$(VERSION)" -f KexStandaloneRun -t abdullin/kex-standalone:$(VERSION)
2 changes: 0 additions & 2 deletions kex-run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/bash

kex-install.sh
cd /home/kex
mvn package
python3 ./kex.py $*

0 comments on commit 137b5c5

Please sign in to comment.