Skip to content

Commit cc2724c

Browse files
committed
Update devcontainer / docker configs
Makes the dev container build properly.
1 parent 7466135 commit cc2724c

File tree

3 files changed

+30
-33
lines changed

3 files changed

+30
-33
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG RUBY_VERSION=3.4.3
2-
FROM ruby:${RUBY_VERSION} as base
2+
FROM ruby:${RUBY_VERSION} AS base
33

44
# Avoid warnings by switching to noninteractive
55
ENV DEBIAN_FRONTEND=noninteractive
@@ -22,7 +22,7 @@ RUN apt-get -o Acquire::Max-FutureTime=86400 update \
2222

2323
WORKDIR /opt
2424
RUN git clone --depth 1 https://github.com/brendangregg/FlameGraph
25-
ENV PATH /opt/FlameGraph:$PATH
25+
ENV PATH="/opt/FlameGraph:$PATH"
2626

2727
# Switch back to dialog for any ad-hoc use of apt-get
2828
ENV DEBIAN_FRONTEND=dialog
@@ -31,4 +31,7 @@ COPY Gemfile* semian.gemspec /workspace/
3131
COPY lib /workspace/lib
3232

3333
WORKDIR /workspace
34+
35+
# Limit grpc native extension build parallelism to avoid running out of memory
36+
ENV GRPC_RUBY_BUILD_PROCS=4
3437
RUN bundle install

.devcontainer/devcontainer.json

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,29 @@
77
"shutdownAction": "stopCompose",
88
"postCreateCommand": "bundle install",
99

10-
"settings": {
11-
"C_Cpp.updateChannel": "Insiders",
12-
"ruby.format": "rubocop",
13-
"ruby.codeCompletion": "rcodetools",
14-
"ruby.useLanguageServer": true,
15-
"ruby.useBundler": true,
16-
"ruby.intellisense": "rubyLocate",
17-
"ruby.lint": {
18-
"rubocop": true,
19-
},
20-
"ruby.lintDebounceTime": 500,
21-
"[ruby]": {
22-
"editor.insertSpaces": true,
23-
"editor.tabSize": 2,
24-
"editor.formatOnSaveTimeout": 1500,
25-
//TODO:paranoidaditya remove comment after repo is formatted correctly
26-
// "editor.formatOnSave": true,
27-
"editor.defaultFormatter": "rebornix.ruby",
28-
},
29-
"terminal.integrated.shell.linux": "/bin/bash"
30-
},
31-
32-
"extensions": [
33-
"ms-vscode.cpptools",
34-
"rebornix.ruby"
35-
]
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"C_Cpp.updateChannel": "Insiders",
14+
"ruby.format": "rubocop",
15+
"ruby.codeCompletion": "rcodetools",
16+
"ruby.useLanguageServer": true,
17+
"ruby.useBundler": true,
18+
"ruby.intellisense": "rubyLocate",
19+
"ruby.lint": {
20+
"rubocop": true
21+
},
22+
"ruby.lintDebounceTime": 500,
23+
"[ruby]": {
24+
"editor.insertSpaces": true,
25+
"editor.tabSize": 2,
26+
"editor.formatOnSaveTimeout": 1500
27+
},
28+
"terminal.integrated.shell.linux": "/bin/bash"
29+
},
30+
"extensions": [
31+
"ms-vscode.cpptools"
32+
]
33+
}
34+
}
3635
}

.devcontainer/docker-compose.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22

3-
version: "3.7"
43
services:
54
semian: &base
65
container_name: semian
@@ -55,25 +54,21 @@ services:
5554

5655
toxiproxy:
5756
image: ghcr.io/shopify/toxiproxy:2.12.0
58-
container_name: toxiproxy
5957
depends_on:
6058
- redis
6159
- mysql
6260

6361
redis:
64-
container_name: redis
6562
image: redis:latest
6663
command: redis-server
6764

6865
mysql:
69-
container_name: mysql
7066
image: mysql:9.3
7167
environment:
7268
MYSQL_ROOT_PASSWORD: root
7369
MYSQL_ROOT_HOST: "%"
7470

7571
postgres:
76-
container_name: postgres
7772
image: postgres:15
7873
environment:
7974
POSTGRES_PASSWORD: root

0 commit comments

Comments
 (0)