Skip to content

Commit

Permalink
C# node: Add Dockerfile for ARM-based Mac
Browse files Browse the repository at this point in the history
Created `Dockerfile.sharp.sources.from_local_dependencies.mac` for
ARM64. For macOS M1 the DF_SHARP should be set to this image and
NEOBENCH_LOGGER should be json-file as journald and syslog are not
supported by this platform.

Close #162
Close #159

Signed-off-by: Ekaterina Pavlova <[email protected]>
  • Loading branch information
AliceInHunterland committed Apr 17, 2024
1 parent 2694b14 commit a2cb858
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN sed -i '/PackageReference Include="Neo" Version=/c \ <ProjectReference In

# Publish neo-cli from source as a self-contained deployment for linux-64 into /neo-cli folder (all dependant .dlls are included).
# See https://docs.microsoft.com/ru-ru/dotnet/core/deploying/#publish-self-contained for details.
RUN dotnet publish -c Release --framework net7.0 -r linux-x64 /neo-project/neo-node/neo-cli -o /neo-cli
RUN dotnet publish -c Release --framework net7.0 /neo-project/neo-node/neo-cli -o /neo-cli

# Build neo-modules from source into /Plugins folder (only plugin .dll and plugin config are included, if you need other dependant .dlls, see the next step)
RUN mkdir /Plugins && \
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ This way is slightly different from the previous one. Here we bring all necessar
`neo-project` folder and replace `PackageReferences` by `ProjectReferences` to the local projects.

1. Set `DF_SHARP` variable of [neo-bench Makefile](https://github.com/nspcc-dev/neo-bench/blob/master/Makefile#L18)
to `.docker/build/Dockerfile.sharp.sources.from_local_dependencies`.
to `.docker/build/Dockerfile.sharp.sources.from_local_dependencies`. For ARM-based Mac architecture set `DF_SHARP`
variable of [neo-bench .env](https://github.com/nspcc-dev/neo-bench/blob/mac/.env#L23) to
`.docker/build/Dockerfile.sharp.sources.from_local_dependencies.mac` and set `NEOBENCH_LOGGER` variable of
[docker .env](https://github.com/nspcc-dev/neo-bench/blob/master/.docker/ir/.env) to `json-file` logger driver.

2. Set `CLIBRANCH`, `MODULESBRANCH`, `NEOVMBRANCH` and `NEOBRANCH` variables of
[C# node-sources Dockerfile](https://github.com/nspcc-dev/neo-bench/blob/master/.docker/build/Dockerfile.sharp.sources.from_local_dependencies#L23)
Expand Down Expand Up @@ -410,7 +413,7 @@ To add one more node configuration, provide all necessary information to the `no

Name|Description| Default |Example
---|---|---------|---
NEOBENCH_LOGGER|Container logging facility| `none` |`none`, `journald`, `syslog`
NEOBENCH_LOGGER|Container logging facility| `none` |`none`, `journald`, `syslog`,`json-file`
NEOBENCH_TC|Parameters passed to the `tc qdisc` (netem discipline) on container startup| |`delay 100ms`
NEOBENCH_TYPE|Type of the load| `NEO` |`NEO`, `GAS`
NEOBENCH_FROM_COUNT|Number of tx senders| `1` | `1`
Expand Down

0 comments on commit a2cb858

Please sign in to comment.