Skip to content

Commit

Permalink
hotfix(build): update image
Browse files Browse the repository at this point in the history
  • Loading branch information
perriea committed Oct 22, 2023
1 parent 99025a4 commit 9b46bb9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion KUBERNETES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Kubernetes

Look : https://github.com/arktos-fund/helm-charts/tree/master/charts/ibkr-gateway
Look : https://github.com/hartza-capital/helm-charts/tree/master/charts/ib-gateway
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IBKR Gateway in Container
# IB Gateway in Container

![Latest](https://github.com/arktos-fund/docker-ibkr-gateway/actions/workflows/build_latest.yml/badge.svg?branch=master)
![Stable](https://github.com/arktos-fund/docker-ibkr-gateway/actions/workflows/build_stable.yml/badge.svg?branch=master)
![Latest](https://github.com/hartza-capital/docker-ib-gateway/actions/workflows/build_latest.yml/badge.svg?branch=master)
![Stable](https://github.com/hartza-capital/docker-ib-gateway/actions/workflows/build_stable.yml/badge.svg?branch=master)

The base of project is based on [extrange/ibkr-docker](https://github.com/extrange/ibkr-docker), but the goal/method is different.
**Arktos Fund** isn't affiliated to **Interactive Brokers**.
Expand Down
14 changes: 9 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@
# Inputs values
CHANNEL=$1
PUSH=$2
IBC_VERSION_LATEST=3.18.0

IBC_RELEASE_STABLE="3.16.2"
IBC_VERSION_STABLE=$(echo "${IBC_RELEASE_STABLE}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
IBC_RELEASE_LATEST="3.18.0-Update.1"
IBC_VERSION_LATEST=$(echo "${IBC_RELEASE_LATEST}" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')

# Default values
URL_DOWNLOAD=https://download2.interactivebrokers.com/installers/ibgateway/$CHANNEL-standalone/version.json
IMAGE=quay.io/arktos-fund/ibkr-gateway
IMAGE=quay.io/hartza-capital/ib-gateway

echo "Try to extract versions"
if [ "$CHANNEL" = "latest" ]; then
BUILD=$(curl -s $URL_DOWNLOAD | grep -o '{.*}' | jq -r .buildVersion)
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=$CHANNEL --build-arg IBC_VERSION=$IBC_VERSION_LATEST --build-arg QUAY_EXPIRE=12w -t $IMAGE:$BUILD
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=$CHANNEL --build-arg IBC_RELEASE=$IBC_RELEASE_LATEST --build-arg IBC_VERSION=$IBC_VERSION_LATEST --build-arg QUAY_EXPIRE=12w -t $IMAGE:$BUILD
elif [ "$CHANNEL" = "stable" ]; then
BUILD=$(curl -s $URL_DOWNLOAD | grep -o '{.*}' | jq -r .buildVersion)
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=$CHANNEL -t $IMAGE:$BUILD
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=$CHANNEL --build-arg IBC_RELEASE=$IBC_RELEASE_STABLE --build-arg IBC_VERSION=$IBC_VERSION_STABLE -t $IMAGE:$BUILD
elif [ "$CHANNEL" = "nightly" ]; then
BUILD=$(git rev-parse --short HEAD)
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=stable --build-arg IBC_VERSION=$IBC_VERSION_LATEST --build-arg QUAY_EXPIRE=1w -t $IMAGE:$BUILD
docker build ./gateway --platform linux/amd64 --build-arg CHANNEL=stable --build-arg IBC_RELEASE=$IBC_RELEASE_LATEST --build-arg IBC_VERSION=$IBC_VERSION_LATEST --build-arg QUAY_EXPIRE=1w -t $IMAGE:$BUILD
else
echo "channel ${CHANNEL} isn't available"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
gateway:
image: quay.io/arktos-fund/ibkr-gateway:stable
image: quay.io/hartza-capital/ib-gateway:stable
volumes:
- ./gateway/config.ini:/opt/ibc/config.ini
- ./gateway/scripts/gatewaystart.sh:/opt/ibc/scripts/gatewaystart.sh
Expand Down
7 changes: 4 additions & 3 deletions gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM debian:stable-slim AS build

ARG CHANNEL=latest
ARG IBC_RELEASE=3.16.2
ARG IBC_VERSION=3.16.2

RUN apt update && \
Expand All @@ -11,18 +12,18 @@ RUN apt update && \
RUN wget https://download2.interactivebrokers.com/installers/ibgateway/${CHANNEL}-standalone/ibgateway-${CHANNEL}-standalone-linux-x64.sh -O install.sh \
&& chmod +x install.sh

RUN wget https://github.com/IbcAlpha/IBC/releases/download/${IBC_VERSION}/IBCLinux-${IBC_VERSION}.zip -O ibc.zip \
RUN wget https://github.com/IbcAlpha/IBC/releases/download/${IBC_RELEASE}/IBCLinux-${IBC_VERSION}.zip -O ibc.zip \
&& unzip ibc.zip -d /opt/ibc

# Set permissions
RUN chmod +x *.sh /opt/ibc/*.sh /opt/ibc/*/*.sh

# Python base for running custom scripts
FROM python:3.11.4-slim-bullseye
FROM python:3.12.0-slim-bookworm

ARG QUAY_EXPIRE=never

LABEL maintainer="oss@arktos.fund"
LABEL maintainer="oss@hartza.capital"
LABEL quay.expires-after=${QUAY_EXPIRE}

RUN apt update && \
Expand Down

0 comments on commit 9b46bb9

Please sign in to comment.