Skip to content

Commit

Permalink
Reintroduce workspace-python image (#1445)
Browse files Browse the repository at this point in the history
* Reintroduce `workspace-python` image

* Update README.md

* trigger java rebuild

* Fix maven?
  • Loading branch information
filiptronicek authored Oct 23, 2024
1 parent ea78e05 commit 7bac3f8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/promote-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
workspace-node-18: "TIMESTAMP_TAG"
workspace-node-20: "TIMESTAMP_TAG"
workspace-node-22: "TIMESTAMP_TAG"
workspace-python: "TIMESTAMP_TAG"
workspace-python-3.9: "TIMESTAMP_TAG"
workspace-python-3.10: "TIMESTAMP_TAG"
workspace-python-3.11: "TIMESTAMP_TAG"
Expand Down
1 change: 1 addition & 0 deletions .github/sync-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sync:
- node-18
- node-20
- node-22
- python
- python-3.9
- python-3.10
- python-3.11
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Each contains a set of chunks: a common base and a language / tool. Every image
- [`gitpod/workspace-node-18`](https://hub.docker.com/r/gitpod/workspace-node-18)
- [`gitpod/workspace-node-20`](https://hub.docker.com/r/gitpod/workspace-node-20)
- [`gitpod/workspace-node-22`](https://hub.docker.com/r/gitpod/workspace-node-22)
- [`gitpod/workspace-python`](https://hub.docker.com/r/gitpod/workspace-python)
- [`gitpod/workspace-python-3.9`](https://hub.docker.com/r/gitpod/workspace-python-3.9)
- [`gitpod/workspace-python-3.10`](https://hub.docker.com/r/gitpod/workspace-python-3.10)
- [`gitpod/workspace-python-3.11`](https://hub.docker.com/r/gitpod/workspace-python-3.11)
Expand Down Expand Up @@ -99,14 +100,6 @@ For images dedicated to Java, Node, Python and Ruby, their lifecycle generally w
- gitpod/workspace-thin
- gitpod/workspace-webassembly

### 📢 Deprecated images

These images are no longer being published:

- gitpod/workspace-python-3.9 or older (please use [`gitpod/workspace-python-3.12`](https://hub.docker.com/r/gitpod/workspace-python-3.12) instead)
- gitpod/workspace-postgresql (please use [`gitpod/workspace-postgres`](https://hub.docker.com/r/gitpod/workspace-postgres) instead)
- gitpod/workspace-ruby-2 (please use [`gitpod/workspace-ruby-3.2`](https://hub.docker.com/r/gitpod/workspace-ruby-3.2) instead)

## Contributing

You can follow the detailed guide on how to contribute [here](CONTRIBUTING.md).
Expand Down
29 changes: 15 additions & 14 deletions chunks/lang-java/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ USER gitpod
ENV TRIGGER_REBUILD=1

RUN curl -fsSL "https://get.sdkman.io" | bash \
&& bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sed -i 's/sdkman_selfupdate_enable=true/sdkman_selfupdate_enable=false/g' /home/gitpod/.sdkman/etc/config \
&& sed -i 's/sdkman_selfupdate_feature=true/sdkman_selfupdate_feature=false/g' /home/gitpod/.sdkman/etc/config \
&& sdk install java ${JAVA_VERSION} \
&& sdk install java 17.0.12.fx-zulu \
&& sdk default java ${JAVA_VERSION} \
&& sdk install gradle \
&& sdk install maven \
&& sdk flush archives \
&& sdk flush temp \
&& mkdir /home/gitpod/.m2 \
&& printf '<settings>\n <localRepository>/workspace/m2-repository/</localRepository>\n</settings>\n' > /home/gitpod/.m2/settings.xml \
&& echo 'export SDKMAN_DIR=\"/home/gitpod/.sdkman\"' >> /home/gitpod/.bashrc.d/99-java \
&& echo '[[ -s \"/home/gitpod/.sdkman/bin/sdkman-init.sh\" ]] && source \"/home/gitpod/.sdkman/bin/sdkman-init.sh\"' >> /home/gitpod/.bashrc.d/99-java"
&& bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sed -i 's/sdkman_selfupdate_enable=true/sdkman_selfupdate_enable=false/g' /home/gitpod/.sdkman/etc/config \
&& sed -i 's/sdkman_selfupdate_feature=true/sdkman_selfupdate_feature=false/g' /home/gitpod/.sdkman/etc/config \
&& sdk install java ${JAVA_VERSION} \
&& sdk install java 17.0.12.fx-zulu \
&& sdk default java ${JAVA_VERSION} \
&& sdk install gradle \
# 4.x requires Java 17+ https://maven.apache.org/docs/history.html
&& sdk install maven 3.9.9 \
&& sdk flush archives \
&& sdk flush temp \
&& mkdir /home/gitpod/.m2 \
&& printf '<settings>\n <localRepository>/workspace/m2-repository/</localRepository>\n</settings>\n' > /home/gitpod/.m2/settings.xml \
&& echo 'export SDKMAN_DIR=\"/home/gitpod/.sdkman\"' >> /home/gitpod/.bashrc.d/99-java \
&& echo '[[ -s \"/home/gitpod/.sdkman/bin/sdkman-init.sh\" ]] && source \"/home/gitpod/.sdkman/bin/sdkman-init.sh\"' >> /home/gitpod/.bashrc.d/99-java"
# above, we are adding the sdkman init to .bashrc (executing sdkman-init.sh does that), because one is executed on interactive shells, the other for non-interactive shells (e.g. plugin-host)
ENV GRADLE_USER_HOME=/workspace/.gradle/
5 changes: 5 additions & 0 deletions dazzle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ combiner:
chunks:
- lang-node:22
- tool-chrome
- name: python
ref:
- base
chunks:
- lang-python:3.13
- name: python-3.13
ref:
- base
Expand Down

0 comments on commit 7bac3f8

Please sign in to comment.