File tree Expand file tree Collapse file tree 4 files changed +36
-5
lines changed
Expand file tree Collapse file tree 4 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 1+ FROM alpine:latest
2+
3+ # Install common tools
4+ RUN apk add --no-cache bash git \
5+ mariadb mariadb-client
6+
7+ # Setup default user
8+ ARG USERNAME=vscode
9+ ARG USER_UID=1000
10+ ARG USER_GID=$USER_UID
11+
12+ RUN addgroup -g $USER_GID -S $USERNAME && \
13+ adduser -u $USER_UID -S -G $USERNAME -s /bin/bash $USERNAME
14+
15+ # Switch to the default user
16+ USER $USERNAME
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " Smart Cooking Database Development Container" ,
3+ "dockerFile" : " Dockerfile" ,
4+ "customizations" : {
5+ "settings" : {
6+ "terminal.integrated.shell.linux" : " /bin/bash"
7+ },
8+ "vscode" : {
9+ "extensions" : [
10+ " mtxr.sqltools-driver-mysql"
11+ ]
12+ }
13+ },
14+ "postStartCommand" : " ls -l && bash ./organize-sql.sh" ,
15+ "remoteUser" : " vscode"
16+ }
Original file line number Diff line number Diff line change 1+ * text =auto
12* .sql linguist-language =sql
23* .sql linguist-detectable =true
Original file line number Diff line number Diff line change @@ -20,11 +20,9 @@ RUN find "${TEMP_SQL_DIR:?}/" -type f -name "*.sql" | while read -r file; do \
2020 done && \
2121 rm -rf "${TEMP_SQL_DIR:?}/"
2222
23- # Set ownership
24- RUN chown -R dbuser:dbuser /docker-entrypoint-initdb.d
25-
26- # Adjust permissions on the MySQL data directory
27- RUN chown -R dbuser:dbuser /var/lib/mysql /etc/mysql
23+ # Set ownership and adjust permissions on the MySQL data directory
24+ RUN chown -R dbuser:dbuser /docker-entrypoint-initdb.d && \
25+ chown -R dbuser:dbuser /var/lib/mysql /etc/mysql
2826
2927# Expose the default MariaDB port (3306)
3028EXPOSE 3306
You can’t perform that action at this time.
0 commit comments