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

Fix Docker build type #4249

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- ${{ startsWith(github.ref, 'refs/tags/') }}
env:
BACKEND: ${{ matrix.BACKEND }}
RELEASE: ${{ matrix.RELEASE }}
BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }}
TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }}
DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }}
runs-on: macos-12
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
env:
COMPILER: ${{ matrix.COMPILER }}
BACKEND: ${{ matrix.BACKEND }}
RELEASE: ${{ matrix.RELEASE }}
BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }}
TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }}
DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -144,8 +144,9 @@ jobs:
runs-on: windows-latest
env:
BACKEND: ${{ matrix.BACKEND }}
RELEASE: ${{ matrix.RELEASE }}
BUILD_TYPE: ${{ matrix.RELEASE && 'RelWithDebInfo' || 'Debug' }}
TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }}
DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
Expand Down
6 changes: 0 additions & 6 deletions ci/build-tests.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/bin/bash
set -euox pipefail

BUILD_TYPE="Debug"
if [[ "${RELEASE:-false}" == "true" ]]; then
BUILD_TYPE="RelWithDebInfo"
fi

BUILD_TYPE=$BUILD_TYPE \
NANO_TEST=ON \
NANO_NETWORK=dev \
NANO_GUI=ON \
Expand Down
6 changes: 4 additions & 2 deletions docker/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:22.04 as builder

ARG COMPILER=gcc
ARG BUILD_TYPE=RelWithDebInfo
ARG SANITIZER
ARG NANO_NETWORK=live
ARG CI_TAG=DEV_BUILD
ARG CI_BUILD=OFF
Expand All @@ -20,7 +22,7 @@ RUN echo ${NANO_NETWORK} >/etc/nano-network
FROM ubuntu:22.04

RUN groupadd --gid 1000 nanocurrency && \
useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurrency
useradd --uid 1000 --gid nanocurrency --shell /bin/bash --create-home nanocurrency

COPY --from=builder /tmp/src/build/nano_node /usr/bin
COPY --from=builder /tmp/src/build/nano_rpc /usr/bin
Expand All @@ -41,4 +43,4 @@ ENTRYPOINT ["/usr/bin/entry.sh"]
CMD ["nano_node", "daemon", "-l"]

ARG REPOSITORY=nanocurrency/nano-node
LABEL org.opencontainers.image.source https://github.com/$REPOSITORY
LABEL org.opencontainers.image.source https://github.com/$REPOSITORY