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+Update NEAR Wallet #56

Merged
1 change: 0 additions & 1 deletion neard_image/staking-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
Expand Down
22 changes: 16 additions & 6 deletions wallet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# syntax=docker/dockerfile-upstream:experimental

FROM phusion/baseimage:0.11 as build
FROM phusion/baseimage:jammy-1.0.1 as build

ARG NODE_URL

ENV NEAR_WALLET_ENV=mainnet
ENV REACT_APP_NODE_URL=${NODE_URL}
ENV NODE_MAJOR=16

## Removed deprecated Node install script replaced with current install instructions, and allows for Changing NodeJS Major Version between 16.x,18.x, 20.x, and 21.x by editing the above ENV variable NODE_MAJOR to the major version desired, 16, 18, 20, and 21. Note: Versions 18.x and up are only available on Jammy and Focal based phusion/baseimage's; if reverting to Bionic 18.04 and earlier, Node version 16.x is the only compatible version.
# Download and install NodeJS GPG keys
RUN mkdir -p /etc/apt/keyrings/yarn
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

## Upgrade Deprecated `apt-key` method of adding GPG keys
# Download and install Yarn Package GPG keys
RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor -o /etc/apt/keyrings/yarn/pubkey.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/yarn/pubkey.gpg] https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

RUN curl -o /tmp/node_setup.sh "https://deb.nodesource.com/setup_14.x"
RUN bash /tmp/node_setup.sh
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo 'deb https://dl.yarnpkg.com/debian/ stable main' | tee /etc/apt/sources.list.d/yarn.list
# Update with newly added sources for Yarn and NodeJS, install Git, Chosen NodeJS version and Yarn
RUN apt-get update -qq && apt-get install -y \
nodejs \
git
Expand All @@ -22,7 +32,7 @@ RUN yarn install
RUN NEAR_WALLET_ENV=mainnet REACT_APP_NODE_URL=${NODE_URL} yarn run build

# ======================== EXECUTE ==================================
FROM nginx:1.22.0-alpine
FROM nginx:1.25.3-alpine
COPY --from=build /near-wallet/packages/frontend/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf

Expand Down
Loading