Skip to content

DevContainer Setup Updates #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions .devcontainer/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM mariadb:10.5

# Labels
LABEL author="chitrank dave"
LABEL version=0.0.1
LABEL description="Oscar-db Docker Image for Development Environment"
LABEL author="OpenOSP"
LABEL version=0.0.2
LABEL description="OpenOSP-EMR Docker Image for Development Environment"

# Install required packages
RUN apt-get update && apt-get install -y dos2unix \
Expand All @@ -12,12 +12,20 @@ RUN apt-get update && apt-get install -y dos2unix \
&& apt-get autoremove

# Adding required files
ADD ./.devcontainer/db/scripts/populate_db.sh /docker-entrypoint-initdb.d/populate_db.sh
ADD ./database /database
ADD ./.devcontainer/development/config/shared/my.cnf /etc/mysql/my.cnf
# Currently this needs the database configuration for post-scripts from the OpenOSP-EMR
# repository it is building a database for; this build process could use fine tuning for
# building older versions with different DB schema. This works, but further work here is
# something for later.

COPY ./.devcontainer/db/scripts/populate_db.sh /docker-entrypoint-initdb.d/populate_db.sh
RUN mkdir /scripts
COPY ./.devcontainer/db/scripts/development.sql /scripts/development.sql
COPY ./database /database
COPY ./.devcontainer/development/config/shared/my.cnf /etc/mysql/my.cnf

# Change permissions
RUN chmod 644 /etc/mysql/my.cnf
RUN chmod 744 /etc/mysql/my.cnf
RUN chmod 755 /scripts

# Converting script files using dos2unix (Required for Windows)
RUN dos2unix /docker-entrypoint-initdb.d/populate_db.sh
Expand Down
Loading