Skip to content

Commit 3573814

Browse files
committed
chore(maintenance): improve Gitpod config (#1782)
* chore(maintenance): pin node 18 in Gitpod * chore: fix nvm & make sam install quiet * chore: fix nvm command * chore: switch to fem * chore: add Dockerfile with pinned version * chore: change to custom docker file * chore: remove redundant command * chore: move SAM install to docker file * chore: remove SAM instructions from init phase * chore: fix install command
1 parent 9b9fc92 commit 3573814

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

Diff for: .gitpod.Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# See gitpod image here: https://hub.docker.com/layers/gitpod/workspace-base/latest
2+
FROM gitpod/workspace-base@sha256:d69d08a0e1fa62b6d8db9e7ffe63dc21a58f0242946d945d776a819aec652130
3+
4+
USER gitpod
5+
6+
# Install fnm to manage Node.js versions
7+
RUN curl -fsSL https://fnm.vercel.app/install | bash -s
8+
9+
# Install AWS SAM CLI
10+
RUN curl -LO https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip \
11+
&& unzip -q aws-sam-cli-linux-x86_64.zip -d sam-installation \
12+
&& sudo ./sam-installation/install \
13+
&& rm -rf sam-installation aws-sam-cli-linux-*

Diff for: .gitpod.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1+
image:
2+
file: .gitpod.Dockerfile
13
tasks:
24
- init: |
35
# Install Nodejs version specified in .nvmrc
4-
nvm install
5-
nvm use
6-
# Install AWS SAM CLI
7-
wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip
8-
unzip aws-sam-cli-linux-x86_64.zip -d sam-installation
9-
sudo ./sam-installation/install
10-
rm -rf sam-installation aws-sam-cli-linux-*
6+
fnm install
7+
fnm use
118
# Install repo dependencies
129
npm run setup-local
1310
vscode:
1411
extensions:
1512
- dbaeumer.vscode-eslint
1613
- esbenp.prettier-vscode
1714
- firsttris.vscode-jest-runner
18-
- amazonwebservices.aws-toolkit-vscode

0 commit comments

Comments
 (0)