Skip to content

Commit

Permalink
Revert "feat(superchain): install both Node 10 and Node 14 (#2718)" (#…
Browse files Browse the repository at this point in the history
…2737)

Includes the following:
- Revert "fix(superchain): use entrypoint to set up nvm (#2736)"
  - This reverts commit 0e247b6.
- Revert "feat(superchain): `$NVM_USE_VERSION` selects Node.js version (#2726)"
  - This reverts commit fb9abf9.
- Revert "feat(superchain): install both Node 10 and Node 14 (#2718)"
  - This reverts commit 3ca97d9.
  • Loading branch information
RomainMuller authored Mar 23, 2021
1 parent 0e247b6 commit e66ecc6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 44 deletions.
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.

0 comments on commit e66ecc6

Please sign in to comment.