forked from rycus86/docker-pycharm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak build process, fix CVEs, add Makefile (PR #5)
- Loading branch information
Showing
4 changed files
with
76 additions
and
25 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,43 +1,51 @@ | ||
FROM --platform=${TARGETPLATFORM} debian:bullseye-20230502 | ||
FROM --platform=${TARGETPLATFORM} debian:bullseye-20231030 | ||
|
||
ARG TARGETARCH | ||
|
||
LABEL maintainer "Viktor Adam <[email protected]>" | ||
LABEL maintainer "Azul Group <[email protected]>" | ||
LABEL maintainer="Azul Group <[email protected]>" | ||
|
||
ARG azul_docker_pycharm_version | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install --no-install-recommends -y \ | ||
python3 python3-dev python3-setuptools python3-pip \ | ||
gcc git openssh-client less curl \ | ||
python3 python3-dev \ | ||
gcc git openssh-client less curl ca-certificates \ | ||
libxtst-dev libxext-dev libxrender-dev libfreetype6-dev \ | ||
libfontconfig1 libgtk2.0-0 libxslt1.1 libxxf86vm1 \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& useradd -ms /bin/bash developer | ||
|
||
ARG PYCHARM_VERSION=2022.3.3 | ||
ARG PYCHARM_BUILD=2022.3.3 | ||
|
||
ARG pycharm_local_dir=.PyCharmCE${PYCHARM_VERSION} | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR /opt/pycharm | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ARG PYCHARM_VERSION | ||
|
||
RUN set -o pipefail \ | ||
&& export pycharm_arch=$(python3 -c "print(dict(amd64='',arm64='-aarch64')['${TARGETARCH}'])") \ | ||
&& export pycharm_source="https://download.jetbrains.com/python/pycharm-community-${PYCHARM_BUILD}${pycharm_arch}.tar.gz" \ | ||
&& export pycharm_source="https://download.jetbrains.com/python/pycharm-community-${PYCHARM_VERSION}${pycharm_arch}.tar.gz" \ | ||
&& echo "Downloading ${pycharm_source}" \ | ||
&& curl -fsSL "${pycharm_source}" -o installer.tgz \ | ||
&& tar --strip-components=1 -xzf installer.tgz \ | ||
&& rm installer.tgz | ||
|
||
# CVE-2021-23383 CVE-2021-23369 CVE-2019-19919 GHSA-q42p-pg8m-cqh6 | ||
# GHSA-q2c6-c6pm-g3gh GHSA-g9r4-xpmj-mj65 GHSA-2cf5-4w76-r9qv CVE-2019-20920 | ||
# GHSA-h6ch-v84p-w6p9 CVE-2020-7712 | ||
RUN rm -rf /opt/pycharm/plugins/textmate | ||
|
||
# CVE-2023-24539 CVE-2023-24540 CVE-2023-29400 CVE-2023-29403 CVE-2023-39325 | ||
# CVE-2023-44487 CVE-2021-21353 | ||
RUN rm /opt/pycharm/bin/repair | ||
|
||
RUN useradd -ms /bin/bash developer | ||
|
||
USER developer | ||
ENV HOME /home/developer | ||
|
||
ARG pycharm_local_dir=.PyCharmCE${PYCHARM_VERSION} | ||
|
||
RUN mkdir /home/developer/.PyCharm \ | ||
&& ln -sf /home/developer/.PyCharm "/home/developer/$pycharm_local_dir" | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
SHELL=/bin/bash | ||
registry_port=5000 | ||
|
||
all: | ||
|
||
start_registry: | ||
docker run \ | ||
--rm \ | ||
--detach \ | ||
--publish $(registry_port):5000 \ | ||
--name registry registry:2.7 | ||
|
||
check_registry: | ||
@curl --fail http://localhost:$(registry_port)/ \ | ||
|| { echo "Run 'make start_registry' first" ; false ; } | ||
|
||
images: check_registry | ||
DOCKER_HOST=$$(docker context inspect --format '{{.Endpoints.docker.Host}}') \ | ||
act \ | ||
--var DOCKERHUB_REPOSITORY="localhost:$(registry_port)/docker.io/ucscgi/azul-pycharm" \ | ||
push | ||
|
||
stop_registry: | ||
docker stop registry |
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