Compare commits

...

13 Commits

Author SHA1 Message Date
Alexander Petric
11b226ae29 formatting 2024-12-24 18:25:53 +01:00
Alexander Petric
4c8915d457 improving lsp image to get rid of critical vulnerabilities 2024-12-24 18:24:13 +01:00
Alexander Petric
5d7104054c Merge branch 'main' into alp/docker_non_root 2024-12-24 15:51:07 +01:00
Alexander Petric
31518f37e3 lsp non root 2024-12-24 15:49:39 +01:00
Alexander Petric
98b9ba8333 Dockerfile 2024-12-24 15:46:51 +01:00
Alexander Petric
4a06426c04 create search and logs folder in order to inherite windmill user permissions 2024-12-23 23:13:35 +01:00
Alexander Petric
334ac17e52 chown tmp folder 2024-12-23 20:00:41 +01:00
Alexander Petric
1ded468858 make root user default 2024-12-23 18:54:23 +01:00
Alexander Petric
fc09d100c4 Merge branch 'main' into alp/docker_non_root 2024-12-23 18:53:48 +01:00
Alexander Petric
42fb962de0 don't remove tag 2024-12-23 11:52:59 +01:00
Alexander Petric
743eb9eeea fix docker image build test tag 2024-12-23 11:50:47 +01:00
Alexander Petric
918a7b3a0b Merge branch 'main' into alp/docker_non_root 2024-12-23 11:34:00 +01:00
Alexander Petric
48f853ee8b main docker file 2024-12-20 16:05:38 +01:00
4 changed files with 39 additions and 13 deletions

View File

@@ -196,6 +196,21 @@ COPY ./frontend/src/lib/hubPaths.json ${APP}/hubPaths.json
RUN windmill cache ${APP}/hubPaths.json && rm ${APP}/hubPaths.json && chmod -R 777 /tmp/windmill
# Create a non-root user 'windmill' with UID and GID 1000
RUN addgroup --gid 1000 windmill && \
adduser --disabled-password --gecos "" --uid 1000 --gid 1000 windmill
RUN cp -r /root/.cache /home/windmill/.cache
RUN mkdir -p /tmp/windmill/logs && \
mkdir -p /tmp/windmill/search
RUN chown -R windmill:windmill ${APP} && \
chown -R windmill:windmill /tmp/windmill && \
chown -R windmill:windmill /home/windmill/.cache
USER root
EXPOSE 8000
CMD ["windmill"]

View File

@@ -143,7 +143,7 @@ services:
expose:
- 3001
volumes:
- lsp_cache:/root/.cache
- lsp_cache:/pyls/.cache
multiplayer:
image: ghcr.io/windmill-labs/windmill-multiplayer:latest

View File

@@ -47,7 +47,7 @@ resource "aws_ecs_task_definition" "windmill_cluster_windmill_lsp_td" {
volume {
name = "lsp_cache"
host_path = "/root/.cache"
host_path = "/pyls/.cache"
}
}

View File

@@ -1,12 +1,21 @@
FROM nikolaik/python-nodejs:python3.11-nodejs19-slim
FROM python:3.11-slim as python-base
FROM node:19-slim as node-base
FROM python-base
COPY --from=node-base /usr/local /usr/local
ENV PATH="/usr/local/bin:${PATH}"
RUN apt-get update \
&& apt-get install -y shellcheck
RUN yarn global add diagnostic-languageserver
RUN yarn global add pyright
&& apt-get install -y shellcheck wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& pip install pipenv
RUN npm install -g diagnostic-languageserver pyright
RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
url=; \
case "$arch" in \
'amd64') \
targz='go1.22.5.linux-amd64.tar.gz'; \
@@ -24,25 +33,27 @@ RUN set -eux; \
ENV PATH="${PATH}:/usr/local/go/bin"
ENV GOBIN=/usr/local/go/bin
RUN /usr/local/go/bin/go install -v golang.org/x/tools/gopls@latest
RUN pip3 install tornado python-lsp-jsonrpc ruff-lsp
COPY --from=denoland/deno:2.1.2 --chmod=755 /usr/bin/deno /usr/bin/deno
ENV PIPENV_VENV_IN_PROJECT=1
RUN mkdir -p /pyls
WORKDIR /pyls
COPY Pipfile .
RUN cat Pipfile
RUN pip install Cython
RUN pipenv install
COPY pyls_launcher.py .
RUN mkdir -p /tmp/monaco && chmod -R 777 /tmp/monaco
RUN cd /tmp/monaco && npm install --save-dev windmill-client
RUN cd /tmp/monaco && yarn add -D windmill-client
RUN chmod -R a+rX /usr/local && \
chmod -R a+rX /pyls
EXPOSE 3001
CMD ["python3" ,"pyls_launcher.py"]
CMD ["python3", "pyls_launcher.py"]