-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dockerfile for dev env in vscode
- Loading branch information
Showing
3 changed files
with
70 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM debian:12-slim as dev | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ARG APP_VERSION | ||
LABEL version=$APP_VERSION | ||
|
||
ENV HOME /opt | ||
RUN mkdir -p $HOME /build /opt | ||
|
||
#required packages | ||
RUN apt-get update -qq && \ | ||
apt-get install -y \ | ||
build-essential wget git curl \ | ||
libsigc++-2.0-dev libjansson-dev libcurl4-openssl-dev libluajit2-5.1-dev libsqlite3-dev \ | ||
libcurl4-openssl-dev libusb-dev libow-dev imagemagick libev-dev libusb-1.0-0-dev \ | ||
knxd knxd-dev googletest libuv1-dev libmosquitto-dev libmosquittopp-dev \ | ||
libola-dev ola \ | ||
unzip zip cmake automake autoconf libtool autopoint gettext \ | ||
tar gzip zsh vim nano sudo zstd less gnupg ripgrep gdb cgdb | ||
|
||
RUN echo "export EDITOR=nano \n\ | ||
export VISUAL=nano \n\ | ||
export LS_OPTIONS='--color=auto' \n\ | ||
eval "$(dircolors)" \n\ | ||
alias ls='ls $LS_OPTIONS' \n\ | ||
alias ll='ls $LS_OPTIONS -l' \n\ | ||
" >> /etc/bash.bashrc | ||
|
||
RUN curl -fsSL https://starship.rs/install.sh | sh -s -- -y | ||
RUN echo 'eval "$(starship init bash)"' >> /etc/bash.bashrc | ||
|
||
#better bash history search with up/down arrows | ||
RUN echo "\n\ | ||
## arrow up \n\ | ||
\"\e[A\":history-search-backward \n\ | ||
## arrow down \n\ | ||
\"\e[B\":history-search-forward \n\ | ||
\n\ | ||
set show-all-if-ambiguous on \n\ | ||
set completion-ignore-case on \n\ | ||
" >> /etc/inputrc |
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,9 +1,25 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
{ | ||
"name": "Calaos Dockerfile", | ||
"context": "..", | ||
"dockerFile": "../Dockerfile", | ||
"name": "Debian12 calaos-server dev container", | ||
"build": { | ||
"target": "dev" | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"forwardPorts": [5454], | ||
} | ||
|
||
"mounts": [ | ||
"source=extensionCache,target=/root/.vscode-server/extensions,type=volume" | ||
], | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ 5454 ], | ||
|
||
// Configure tool-specific properties. | ||
"customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
"remoteUser": "root", | ||
|
||
"runArgs": ["--privileged"] | ||
} |
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