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

Revert "feat(superchain): install both Node 10 and Node 14 (#2718)" #2737

Merged
merged 1 commit into from
Mar 23, 2021
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
27 changes: 9 additions & 18 deletions superchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,17 @@ RUN amazon-linux-extras install docker
&& yum clean all && rm -rf /var/cache/yum
VOLUME /var/lib/docker

# Install Node using NVM (Node Version Manager) so we can have multiple Node versions installed and easily switch
# between them. $NVM_USE_VERSION becomes a global variable the container responds to to pick a Node version on startup,
# if set.
ENV NVM_DIR /usr/local/nvm
COPY run.sh /usr/local/bin/

RUN mkdir -p $NVM_DIR && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash - \
&& chmod a+x /usr/local/bin/run.sh \
# Source NVM into this shell
&& source $NVM_DIR/nvm.sh \
# Install Node 10 and yarn on node 10. First installed version becomes default.
&& nvm install 10 \
&& nvm exec 10 npm install -g yarn \
# Install Node 14 and yarn on node 14.
&& nvm install 14 \
&& nvm exec 14 npm install -g yarn \
# Make npm play nicer with Docker containers running as "root".
# Install Node 10+
RUN curl -sL https://rpm.nodesource.com/setup_10.x | bash - \
&& yum -y install nodejs \
&& yum clean all && rm -rf /var/cache/yum \
&& npm set unsafe-perm true

# Install Yarn
RUN curl -sSL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo \
&& yum -y install yarn \
&& yum clean all && rm -rf /var/cache/yum

# Install some configuration
COPY ssh_config /root/.ssh/config
RUN chmod 600 /root/.ssh/config
Expand All @@ -121,5 +113,4 @@ LABEL org.opencontainers.image.created=${BUILD_TIMESTAMP}
org.opencontainers.image.revision=$COMMIT_ID \
org.opencontainers.image.authors="Amazon Web Services (https://aws.amazon.com)"

ENTRYPOINT ["/usr/local/bin/run.sh"]
CMD ["/bin/bash"]
29 changes: 9 additions & 20 deletions superchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,15 @@ required in order to package [jsii] projects in all supported languages.

## Included Language SDKs

SDK | Version
--------------|-------------------------------------------
`OpenJDK 8` | Amazon Corretto `>= 8.242.08.1`
`.NET SDK` | `>= 3.1.101`
`mono` | `>= 6.8.0.105`
`Node` | `node >= 10.19.0` with `npm >= 6.13.4`
`Node` (Alt) | `node >= 14.24.0` with `npm >= 6.13.4` (see [notes] below)
`PowerShell` | `pwsh >= 6.2.3`
`Python 3` | `python3 >= 3.7.4` with `pip3 >= 20.0.2`
`Go` | `go >= 1.16`

[notes]: #notes-on-node.js

### Notes on Node.js

By default, Node.js will be at version 10. To switch to Node 14, pass
`-e NVM_USE_VERSION=14` into the container at startup, or use
[`nvm` commands][nvm] to switch between versions or to install other versions.

[nvm]: https://github.com/nvm-sh/nvm
SDK | Version
----------------|-------------------------------------------
`OpenJDK 8` | Amazon Corretto `>= 8.242.08.1`
`.NET SDK` | `>= 3.1.101`
`mono` | `>= 6.8.0.105`
`Javascript` | `node >= 10.19.0` with `npm >= 6.13.4`
`PowerShell` | `pwsh >= 6.2.3`
`Python 3` | `python3 >= 3.7.4` with `pip3 >= 20.0.2`
`Go` | `go >= 1.16`

## Included Tools & Utilities

Expand Down
6 changes: 0 additions & 6 deletions superchain/run.sh

This file was deleted.