-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add universal devcontainer image, install R. * Add "postCreateCommand": "make"
- Loading branch information
Showing
3 changed files
with
91 additions
and
0 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,29 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/universal:1.7.5-linux | ||
|
||
# Set environment variables to avoid interactive prompts during package installation | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# # Update and install necessary packages | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
software-properties-common \ | ||
wget \ | ||
gnupg2 \ | ||
lsb-release \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
libcurl4-openssl-dev \ | ||
libssl-dev \ | ||
libxml2-dev | ||
|
||
# # Install R | ||
RUN apt-get install -y r-base | ||
|
||
# # Install PHP | ||
# RUN add-apt-repository ppa:ondrej/php && \ | ||
# apt-get update && \ | ||
# apt-get install -y php7.4 | ||
|
||
# # Install Lighttpd | ||
# RUN apt-get update && \ | ||
# apt-get install -y lighttpd |
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,27 @@ | ||
{ | ||
"name": "Universal with PostgreSQL", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
// "ghcr.io/shyim/devcontainers-features/php:latest": { | ||
// "version": "7.4", | ||
// "extensionsExtra": "xdebug redis" | ||
// } | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// This can be used to network with other containers or the host. | ||
// "forwardPorts": [5000, 5432], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "make" | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
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,35 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
build: | ||
context: .. | ||
dockerfile: .devcontainer/Dockerfile | ||
|
||
volumes: | ||
- ../..:/workspaces:cached | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
command: sleep infinity | ||
|
||
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. | ||
network_mode: service:db | ||
|
||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) | ||
|
||
db: | ||
image: postgres:latest | ||
restart: unless-stopped | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: postgres | ||
POSTGRES_PASSWORD: postgres | ||
|
||
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) | ||
|
||
volumes: | ||
postgres-data: |