Skip to content

Commit

Permalink
Dev Container support w/Dockerfile (Gemba#23)
Browse files Browse the repository at this point in the history
Co-authored-by: retrobit <[email protected]>
  • Loading branch information
retrobit and retrobit authored Jan 31, 2024
1 parent 0ed8379 commit d3bff90
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1

# Dev Container Template (https://containers.dev/templates) based on latest Debian "bookworm" release or use vanilla Debian from Docker Hub instead
FROM mcr.microsoft.com/devcontainers/base:bookworm
# FROM debian:bookworm

# Update, upgrade, and install necessary packages
RUN sudo apt update && sudo apt upgrade && sudo apt install -y qtbase5-dev

# Make (compile) and install Skyscraper
RUN QT_SELECT=5
# These can not be done in a Dev Container, as workspace doesn't exist until after Docker container is created from image, so commands are unaware of source files. Instead, do in `postCreateCommand` of `devcontainer.json`.
# RUN qmake && make -j$(nproc) && sudo make install
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:bookworm"
"build": {
// Path is relative to the `devcontainer.json` file
"dockerfile": "Dockerfile"
},

// 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": [],

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker"
]
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"

// Actions that are run after the container is created
"postCreateCommand": "qmake && make -j$(nproc) && sudo make install"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ packages
*-packages
target
build

# macOS
.DS_Store

# VS Code
*.code-workspace

0 comments on commit d3bff90

Please sign in to comment.