-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,45 @@ | ||
FROM gitpod/workspace-python-3.12 | ||
|
||
USER root | ||
|
||
# Install system dependencies | ||
# - bash-completion for shell completions of invoke | ||
# - gettext for Django translations | ||
# - postgresql-common for the apt.postgresql.org.sh script | ||
# - postgresql-client-17 for a current version of psql | ||
RUN sudo apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
bash-completion \ | ||
gettext \ | ||
postgresql-common \ | ||
&& /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
postgresql-client-17 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
USER gitpod | ||
|
||
ENV NVM_DIR $HOME/.nvm | ||
ENV NVM_VERSION 0.39.7 | ||
ENV NODE_VERSION 20.12.2 | ||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | ||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||
|
||
# Node is not available in in the Gitpod Python image, so we install is manually | ||
RUN mkdir $NVM_DIR && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash && \ | ||
. $NVM_DIR/nvm.sh && \ | ||
nvm install $NODE_VERSION && \ | ||
nvm alias default $NODE_VERSION && \ | ||
nvm use default | ||
|
||
RUN python3 -m pip install --user pipx && \ | ||
python3 -m pipx ensurepath | ||
|
||
RUN python3 -m pipx install invoke && \ | ||
invoke --print-completion-script=bash >> $HOME/.bash_completion | ||
# Node is not available in in the Gitpod Python image, so we install it | ||
RUN mkdir $NVM_DIR \ | ||
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash \ | ||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& nvm use default | ||
|
||
RUN python3 -m pipx install playwright && playwright install --with-deps chromium | ||
RUN python3 -m pip install --user pipx \ | ||
&& python3 -m pipx ensurepath | ||
|
||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | ||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||
RUN python3 -m pipx install invoke \ | ||
&& invoke --print-completion-script=bash >> $HOME/.bash_completion | ||
|
||
# Poetry is already installed in the base Gitpod Python image, | ||
# but we make sure uses the latest version and make bash completions available | ||
RUN poetry self update && \ | ||
poetry completions bash >> ~/.bash_completion | ||
RUN poetry self update \ | ||
&& poetry completions bash >> ~/.bash_completion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters