Skip to content

Commit f489eab

Browse files
committed
build: add devcontainer
1 parent fe69626 commit f489eab

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM ubuntu:latest
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ENV TZ=Europe/Berlin
5+
6+
# Update the repositories
7+
RUN apt update --yes
8+
9+
RUN apt install --yes --no-install-recommends locales
10+
11+
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
12+
locale-gen
13+
ENV LANG en_US.UTF-8
14+
ENV LANGUAGE en_US:en
15+
ENV LC_ALL en_US.UTF-8
16+
17+
18+
RUN apt install --yes --no-install-recommends curl make build-essential \
19+
libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \
20+
wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev \
21+
libxmlsec1-dev libffi-dev liblzma-dev pipx git less nano
22+
23+
RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && \
24+
apt install -y nodejs
25+
26+
RUN pipx install hatch
27+
28+
RUN curl https://pyenv.run | bash
29+
30+
31+
RUN echo 'if [ -d "$HOME/.local/bin" ] ; then' >> ~/.profile
32+
RUN echo ' PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
33+
RUN echo 'fi' >> ~/.profile
34+
35+
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
36+
RUN echo 'command -v pyenv >/dev/null || export PATH="$PATH:$PYENV_ROOT/bin"' >> ~/.profile
37+
RUN echo 'eval "$(pyenv init -)"' >> ~/.profile
38+
39+
40+
RUN . ~/.profile && pyenv install 3.8.16
41+
RUN . ~/.profile && pyenv install 3.11.1
42+
RUN . ~/.profile && pyenv global 3.11.1

.devcontainer/devcontainer.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
3+
{
4+
"name": "robotcode devcontainer",
5+
6+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
7+
"build": {
8+
"dockerfile": "Dockerfile"
9+
}
10+
11+
// Features to add to the dev container. More info: https://containers.dev/features.
12+
// "features": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
// "forwardPorts": [],
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
// "postCreateCommand": "uname -a",
19+
20+
// Configure tool-specific properties.
21+
// "customizations": {},
22+
23+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24+
// "remoteUser": "root"
25+
}

0 commit comments

Comments
 (0)