|
| 1 | +# /******************************************************************************** |
| 2 | +# * Copyright (c) 2024 Contributors to the Eclipse Foundation |
| 3 | +# * |
| 4 | +# * See the NOTICE file(s) distributed with this work for additional |
| 5 | +# * information regarding copyright ownership. |
| 6 | +# * |
| 7 | +# * This program and the accompanying materials are made available under the |
| 8 | +# * terms of the Apache License 2.0 which is available at |
| 9 | +# * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# * |
| 11 | +# * SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ********************************************************************************/ |
| 13 | + |
| 14 | +FROM mcr.microsoft.com/devcontainers/rust:1-1-bookworm |
| 15 | +ARG DEBIAN_FRONTEND=noninteractive |
| 16 | +ENV CROSS_CONTAINER_IN_CONTAINER=true |
| 17 | +ENV TZ=Europe/Berlin |
| 18 | +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
| 19 | +RUN apt-get update -y |
| 20 | +RUN apt install software-properties-common build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev -y |
| 21 | + |
| 22 | +USER vscode |
| 23 | +RUN cargo install cross cargo-license cargo-cyclonedx |
| 24 | + |
| 25 | +# Installing pyEnv to set up specific version of Python |
| 26 | +ENV HOME=/home/vscode |
| 27 | +WORKDIR ${HOME} |
| 28 | +RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv |
| 29 | +ENV PYENV_ROOT="${HOME}/.pyenv" |
| 30 | +ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}" |
| 31 | +ENV PYTHON_VERSION=3.12 |
| 32 | +RUN pyenv install ${PYTHON_VERSION} |
| 33 | +RUN pyenv global ${PYTHON_VERSION} |
| 34 | + |
| 35 | +# Fails due to gpg keyserver not accessible via corporate proxy |
| 36 | +# Moved to postStartCommand.sh for DevContainer |
| 37 | +# RUN pip install "git+https://github.com/eclipse-kuksa/kuksa-common.git@v1#subdirectory=sbom-tools" |
0 commit comments