Add image to CI, and update startCodex.sh
This commit is contained in:
parent
84f88d4316
commit
a9885502d4
|
@ -38,6 +38,18 @@ jobs:
|
|||
context: .
|
||||
file: docker/codex.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
# Slim it!
|
||||
- name: Minify docker image
|
||||
uses: kitabisa/docker-slim-action@v1
|
||||
env:
|
||||
DSLIM_HTTP_PROBE: false
|
||||
with:
|
||||
target: ${{ steps.meta.outputs.labels }}
|
||||
tag: ${{ steps.meta.outputs.tags }}
|
||||
# Push to the docker registry
|
||||
- name: Push image to docker registry
|
||||
run: docker image push "${{ steps.meta.outputs.labels }}:${{ steps.meta.outputs.tags }}"
|
||||
if: github.event_name != 'pull_request'
|
||||
|
|
|
@ -39,6 +39,7 @@ Codex docker image supports the following environment variables:
|
|||
- ETH_PROVIDER
|
||||
- ETH_ACCOUNT
|
||||
- ETH_DEPLOYMENT
|
||||
- SIMULATE_PROOF_FAILURES
|
||||
|
||||
(*) These variables have default values in the docker image that are different from Codex's standard default values.
|
||||
|
||||
|
@ -53,3 +54,13 @@ To get the IP address of a container within a network:
|
|||
Find container Id: `docker ps`
|
||||
Open terminal in container: `docker exec -it <CONTAINER ID> sh`
|
||||
Get IP addresses: `ifconfig`
|
||||
|
||||
# Slim
|
||||
1. Build the image using `docker build -t status-im/codexsetup:latest -f codex.Dockerfile ..`
|
||||
2. The docker image can then be minifed using [slim](https://github.com/slimtoolkit/slim). Install slim on your path and then run:
|
||||
```shell
|
||||
slim # brings up interactive prompt
|
||||
>>> build --target status-im/codexsetup --http-probe-off true
|
||||
```
|
||||
3. This should output an image with name `status-im/codexsetup.slim`
|
||||
4. We can then bring up the image using `docker-compose up -d`.
|
|
@ -4,24 +4,24 @@ services:
|
|||
ports:
|
||||
- 8080:8080
|
||||
# Available environment variables:
|
||||
# environment:
|
||||
# - LOG_LEVEL=TRACE
|
||||
# - METRICS_ADDR=0.0.0.0
|
||||
# - METRICS_PORT=9090
|
||||
# - NAT_IP=2.3.4.5
|
||||
# - API_PORT=8080
|
||||
# - DISC_IP=3.4.5.6
|
||||
# - DISC_PORT=8765
|
||||
# - NET_PRIVKEY=privkey
|
||||
# - BOOTSTRAP_SPR=bootstrap_record
|
||||
# - MAX_PEERS=123
|
||||
# - AGENT_STRING=agent_string
|
||||
# - STORAGE_QUOTA=123456789
|
||||
# - BLOCK_TTL=23456
|
||||
# - CACHE_SIZE=6543
|
||||
# - ETH_PROVIDER=eth
|
||||
# - ETH_ACCOUNT=account
|
||||
# - ETH_DEPLOYMENT=deploy
|
||||
# - SIMULATE_PROOF_FAILURES=0
|
||||
environment:
|
||||
- LOG_LEVEL=TRACE
|
||||
- METRICS_ADDR=0.0.0.0
|
||||
- METRICS_PORT=9090
|
||||
- NAT_IP=2.3.4.5
|
||||
- API_PORT=8080
|
||||
- DISC_IP=3.4.5.6
|
||||
- DISC_PORT=8765
|
||||
- NET_PRIVKEY=privkey
|
||||
- BOOTSTRAP_SPR=bootstrap_record
|
||||
- MAX_PEERS=123
|
||||
- AGENT_STRING=agent_string
|
||||
- STORAGE_QUOTA=123456789
|
||||
- BLOCK_TTL=23456
|
||||
- CACHE_SIZE=6543
|
||||
- ETH_PROVIDER=eth
|
||||
- ETH_ACCOUNT=account
|
||||
- ETH_MARKETPLACE_ADDRESS=0x59b670e9fA9D0A427751Af201D676719a970857b
|
||||
- SIMULATE_PROOF_FAILURES=2
|
||||
|
||||
|
||||
|
|
|
@ -122,6 +122,7 @@ if [ -n "$ETH_PROVIDER" ] && [ -n "$ETH_ACCOUNT" ] && [ -n "$ETH_MARKETPLACE_ADD
|
|||
args="$args --eth-deployment=/root/marketplace_address.json"
|
||||
|
||||
if [ -n "$SIMULATE_PROOF_FAILURES" ]; then
|
||||
echo "Simulate proof failures: $SIMULATE_PROOF_FAILURES"
|
||||
args="$args --simulate-proof-failures=$SIMULATE_PROOF_FAILURES"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue