Skip to content

Commit 34faace

Browse files
committed
improvements: docker updates
1 parent da77588 commit 34faace

File tree

5 files changed

+32
-18
lines changed

5 files changed

+32
-18
lines changed

.devcontainer/.bashrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Get current Git branch
2+
parse_git_branch() {
3+
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
4+
}
5+
6+
# Custom PS1 prompt: green user@host, blue directory, yellow git branch
7+
export PS1='\[\e[32m\]\u@\h\[\e[m\]:\[\e[34m\]\w\[\e[33m\]$(parse_git_branch)\[\e[m\]\$ '

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"name": "PrimeVue Breeze SPA",
44
"dockerComposeFile": [
5-
"../docker-compose.local.yml"
5+
"../docker-compose.dev.yml"
66
],
77
"service": "web",
88
"workspaceFolder": "/workspace",
@@ -26,7 +26,7 @@
2626
"pmneo.tsimporter"
2727
],
2828
"settings": {
29-
"terminal.integrated.shell.linux": "/bin/sh",
29+
"terminal.integrated.shell.linux": "/bin/bash",
3030
"html.format.wrapAttributes": "force-expand-multiline",
3131
"[vue]": {
3232
"editor.defaultFormatter": "Vue.volar",

Dockerfile.dev

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Intended for local/development use
2+
FROM node:22-alpine
3+
4+
USER root
5+
6+
RUN apk add --no-cache git openssh libc6-compat bash shadow
7+
8+
RUN chsh -s /bin/bash node
9+
10+
USER node
11+
12+
COPY --chown=node:node .devcontainer/.bashrc /home/node/.bashrc
13+
14+
RUN git config --global --add safe.directory /workspace
15+
16+
WORKDIR /workspace
17+
18+
EXPOSE 80
19+
20+
CMD ["bash"]

Dockerfile.local

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ services:
22
web:
33
build:
44
context: .
5-
dockerfile: Dockerfile.local
5+
dockerfile: Dockerfile.dev
66
container_name: vue-spa
7-
entrypoint: /bin/sh
7+
hostname: alpine-node-22
8+
entrypoint: /bin/bash
89
working_dir: /workspace
910
volumes:
1011
- '.:/workspace'

0 commit comments

Comments
 (0)