Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Dockerfile capable of building all targets #170 #171

Closed
wants to merge 1 commit into from

Conversation

theoreticalbts
Copy link

@theoreticalbts theoreticalbts commented Nov 21, 2022

Some work on a Dockerfile. See #170.

Brief description

Initial attempt at implementing a Dockerfile. Basically Dockerizing the existing Travis scripts.

Has some shortcomings:

  • Version pinning is not exactly the same as CI scripts
  • Downloading binaries doesn't work with Alpine (glibc vs. musl issue, I believe), so I used the Alpine package manager for e.g. Yarn / Node
  • Does not interface with CI scripts in any way
  • Outputs a tarball in the root directory

Merging this should be harmless, as it strictly adds files; no existing scripts are changed.

Ideally a Travis guru should adapt the CI scripts to build the Dockerfile and upload the output to the relevant places. Local and CI builds should share as much infrastructure as possible (anything else defeats the point of having CI).

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

# docker build . -t koinos-proto:latest
... lots of output ...
Successfully tagged koinos-proto:latest

# docker run -it --rm koinos-proto /bin/sh
/koinos-proto # ls -al /*.gz
-rw-r--r--    1 root     root        777648 Nov 21 20:12 /koinos-proto-generated.tar.gz

/koinos-proto # tar tzvf /koinos-proto-generated.tar.gz | less
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-as/
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-as/assembly/
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/
-rw-r--r-- root/root       185 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/options.ts
-rw-r--r-- root/root      1559 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/common.ts
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/contracts/
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/contracts/vhp/
-rw-r--r-- root/root      4455 2022-11-21 20:12:25 koinos-proto-as/assembly/koinos/contracts/vhp/vhp.ts
... lots of output ...
-rw-r--r-- root/root     32946 2022-11-21 20:12:25 koinos-proto-python/koinos/chain/chain_pb2.py
-rw-r--r-- root/root      8949 2022-11-21 20:12:25 koinos-proto-python/koinos/chain/authority_pb2.py
-rw-r--r-- root/root      5304 2022-11-21 20:12:25 koinos-proto-python/koinos/chain/events_pb2.py
-rw-r--r-- root/root     12591 2022-11-21 20:12:25 koinos-proto-python/koinos/chain/error_pb2.py
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-python/koinos/account_history/
-rw-r--r-- root/root     11527 2022-11-21 20:12:25 koinos-proto-python/koinos/account_history/account_history_pb2.py
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-python/koinos/broadcast/
-rw-r--r-- root/root     20056 2022-11-21 20:12:25 koinos-proto-python/koinos/broadcast/broadcast_pb2.py
drwxr-xr-x root/root         0 2022-11-21 20:12:25 koinos-proto-python/koinos/contract_meta_store/
-rw-r--r-- root/root      2504 2022-11-21 20:12:25 koinos-proto-python/koinos/contract_meta_store/contract_meta_store_pb2.py

@koinos-ci
Copy link

This pull request is stale because it has been open for 30 days with no activity.

@koinos-ci
Copy link

This pull request was closed because it has been inactive for 14 days since being marked as stale.

@koinos-ci koinos-ci closed this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants