Skip to content

Commit eb19651

Browse files
committed
Update the README to reflect recent changes.
Encourage users to use the docker image published in the github package registry.
1 parent 83bfa22 commit eb19651

1 file changed

Lines changed: 45 additions & 12 deletions

File tree

README.md

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,66 @@ Anonymized data from the Diffix-protected datasets is inherently restricted. The
1717

1818
### Prerequisites
1919

20-
#### Aircloak API Key
20+
- [] Aircloak API Key
2121

22-
You will need an authorization key for the Aircloak API. This should be assigned to the `AIRCLOAK_API_KEY`
22+
You will need an authorization token for the Aircloak API. This should be assigned to the `AIRCLOAK_API_KEY`
2323
variable in your environment.
2424

25-
### Running
25+
- [] Docker
2626

27-
The simplest way to get started is using Docker. The http api is exposed on port 5000.
27+
Not a strict requirement, but the easiest way to get started is with [Docker](https://www.docker.com/get-started).
2828

29-
You will need to assign the Aircloak Api endpoint to the `AIRCLOAK_API_URL` environment variable, for example the following exposes the api on port `5000` using the Aircloak Api at `https://attack.aircloak.com/api/`:
29+
### Docker Image from github registry
30+
31+
A latest release is published as a docker image in the github registry.
32+
33+
In order to pull from the github registry you need to authenticate with a github access token:
34+
1. Go [here](https://github.com/settings/tokens) and create a new token with the `read:packages` permission.
35+
2. Save it in a file, for example `github_registry_token.txt`
36+
3. Authenticate with docker login using the generated token for your github username:
37+
```
38+
cat github_registry_token.txt | docker login docker.pkg.github.com -u $GITHUB_USERNAME --password-stdin
39+
```
40+
See [here](https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages) for further information.
41+
42+
43+
With the above out of the way, you can download and run the latest image with a single docker command.
44+
45+
You will need to assign the Aircloak Api endpoint to the `AIRCLOAK_API_URL` environment variable in the docker
46+
container. For example, the following exposes the explorer api on port `5000` and targets the Aircloak Api at
47+
`https://attack.aircloak.com/api/`:
3048
3149
```
32-
docker build -t explorer .
33-
docker run -it --rm -e AIRCLOAK_API_URL="https://attack.aircloak.com/api/" -p 5000:80 explorer
50+
docker run -it --rm \
51+
-e AIRCLOAK_API_URL="https://attack.aircloak.com/api/" \
52+
-p 5000:80 \
53+
docker.pkg.github.com/diffix/explorer/explorer-api:latest
3454
```
3555
36-
If you are running in a unix-like environment, you can use or adapt the `build.sh` and `run.sh` scripts. The following is equivalent to the above command.
56+
57+
### Docker build
58+
59+
You can also build and run the docker image locally.
60+
61+
As above, we need to assign the Aircloak Api endpoint to an environment variable in the container.
3762
3863
```
39-
./build.sh
40-
./run.sh https://attack.aircloak.com/api/ 5000
64+
# 1. Clone this repo
65+
git clone https://github.com/diffix/explorer.git
66+
67+
# 2. Build the docker image
68+
docker build -t explorer explorer
69+
70+
# 3. Run the application in a new container
71+
docker run -it --rm -e AIRCLOAK_API_URL="https://attack.aircloak.com/api/" -p 5000:80 explorer
4172
```
4273
43-
> Note you will also need an access token for the Aircloak Api. This token is passed with the request to the `/explore` endpoint.
4474
4575
## Usage
4676
77+
> Note you will need an access token for the Aircloak Api. This token is passed as part of the request payload
78+
> to the `/explore` endpoint.
79+
4780
### Launching an exploration
4881
4982
The explorer exposes an `/explore` endpoint that expects a `POST` request containing the dataset, table and column to analyse. Assuming you are running the explorer on `localhost:5000`:
@@ -115,7 +148,7 @@ For further examples, check out the basic [client implementations](src/clients).
115148

116149
The simplest way to get a development environment up and running is with VS Code's remote containers feature.
117150

118-
> Detailed information on setting this up can be found
151+
> Detailed information on setting up remote containers for VS Code can be found
119152
[here](https://code.visualstudio.com/docs/remote/containers#_getting-started).
120153

121154
The short version:

0 commit comments

Comments
 (0)