Skip to content

Commit

Permalink
Use workdir in dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
hajduakos committed Aug 11, 2020
1 parent aafb6d8 commit b702277
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build sts Docker image
- name: Build STS Docker image
run: docker build -t theta-sts-cli -f docker/theta-sts-cli.Dockerfile .
- name: Run STS docker on example
run: ./docker/run-theta-sts-cli.sh subprojects/sts/src/test/resources/simple1.system
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {

allprojects {
group = "hu.bme.mit.inf.theta"
version = "1.4.3"
version = "1.4.4"

apply(from = rootDir.resolve("gradle/shared-with-buildSrc/mirrors.gradle.kts"))
}
Expand Down
9 changes: 4 additions & 5 deletions docker/theta-cfa-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ RUN apt-get update && \

RUN mkdir theta
COPY . theta
RUN cd theta && \
./gradlew theta-cfa-cli:build && \
cd .. && \
mv theta/subprojects/cfa-cli/build/libs/theta-cfa-cli-*-all.jar ./theta-cfa-cli.jar
WORKDIR theta
RUN ./gradlew theta-cfa-cli:build && \
mv subprojects/cfa-cli/build/libs/theta-cfa-cli-*-all.jar ../theta-cfa-cli.jar
WORKDIR ..

ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./theta/lib/"

ENTRYPOINT ["java", "-jar", "theta-cfa-cli.jar"]

9 changes: 4 additions & 5 deletions docker/theta-sts-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ RUN apt-get update && \

RUN mkdir theta
COPY . theta
RUN cd theta && \
./gradlew theta-sts-cli:build && \
cd .. && \
mv theta/subprojects/sts-cli/build/libs/theta-sts-cli-*-all.jar ./theta-sts-cli.jar
WORKDIR theta
RUN ./gradlew theta-sts-cli:build && \
mv theta/subprojects/sts-cli/build/libs/theta-sts-cli-*-all.jar ../theta-sts-cli.jar
WORKDIR ..

ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./theta/lib/"

ENTRYPOINT ["java", "-jar", "theta-sts-cli.jar"]
7 changes: 3 additions & 4 deletions docker/theta-xta-cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ RUN apt-get update && \

RUN mkdir theta
COPY . theta
RUN cd theta && \
WORKDIR theta
./gradlew theta-xta-cli:build && \
cd .. && \
mv theta/subprojects/xta-cli/build/libs/theta-xta-cli-*-all.jar ./theta-xta-cli.jar
mv theta/subprojects/xta-cli/build/libs/theta-xta-cli-*-all.jar ../theta-xta-cli.jar
WORKDIR ..

ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./theta/lib/"

ENTRYPOINT ["java", "-jar", "theta-xta-cli.jar"]

6 changes: 3 additions & 3 deletions subprojects/cfa-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ The runnable jar file will appear under _build/libs/_ with the name _theta-cfa-c
More information can also be found below.
- For example `java -jar theta-cfa-cli.jar --model counter.cfa --loglevel INFO` runs the default analysis with logging on the `counter.cfa` input file.

### Docker (beta)
### Docker

An experimental Dockerfile is also available under the _docker_ directory in the root of the repository.
A Dockerfile is also available under the _docker_ directory in the root of the repository.
The image can be built using the following command (from the root of the repository):
```
docker build -t theta-cfa-cli -f docker/theta-cfa-cli.Dockerfile .
Expand Down Expand Up @@ -90,4 +90,4 @@ Otherwise, the output is simply in `dot` format.
| Flag | Description |
|--|--|
| `--benchmark` | Benchmark mode, only print metrics in csv format. |
| `--header` | Print the header for the benchmark mode csv format. |
| `--header` | Print the header for the benchmark mode csv format. |
6 changes: 3 additions & 3 deletions subprojects/sts-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ The runnable jar file will appear under _build/libs/_ with the name _theta-sts-c
More information can also be found below.
- For example `java -jar theta-sts-cli.jar --model counter.system --loglevel INFO` runs the default analysis with logging on the `counter.system` input file.

### Docker (beta)
### Docker

An experimental Dockerfile is also available under the _docker_ directory in the root of the repository.
A Dockerfile is also available under the _docker_ directory in the root of the repository.
The image can be built using the following command (from the root of the repository):
```
docker build -t theta-sts-cli -f docker/theta-sts-cli.Dockerfile .
Expand Down Expand Up @@ -73,4 +73,4 @@ All arguments are optional, except `--model`.
| Flag | Description |
|--|--|
| `--benchmark` | Benchmark mode, only print metrics in csv format. |
| `--header` | Print the header for the benchmark mode csv format. |
| `--header` | Print the header for the benchmark mode csv format. |
6 changes: 3 additions & 3 deletions subprojects/xta-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The runnable jar file will appear under _build/libs/_ with the name _theta-xta-c
- If no arguments are given, a help screen is displayed about the arguments and their possible values.
More information can also be found below.

### Docker (beta)
### Docker

An experimental Dockerfile is also available under the _docker_ directory in the root of the repository.
A Dockerfile is also available under the _docker_ directory in the root of the repository.
The image can be built using the following command (from the root of the repository):
```
docker build -t theta-xta-cli -f docker/theta-xta-cli.Dockerfile .
Expand All @@ -29,4 +29,4 @@ The script `run-theta-xta-cli.sh` can be used for running the containerized vers
```
./run-theta-xta-cli.sh model.xta [OTHER FLAGS]
```
Note that the model must be given as the first positional argument (without `--model`).
Note that the model must be given as the first positional argument (without `--model`).

0 comments on commit b702277

Please sign in to comment.