![]() ![]() Since web is based on our Rails app, we specify the build is happening in the current directory.The web container requires that the db container be available first, so we add the section depends_on and include db in the list.We can keep these names short because they only need to exist in this file. The second ( web) is what we're calling our web application's container.If we want a user with enough permissions to create their own database, we'll need to use the root user and provide the password for root. The environment variable MYSQL_ROOT_PASSWORD was provided to the mysql:5.7 section based on configuration advice available on the website.The first ( db) is based on the dockerhub mysql image, which is robust enough for our needs.# Create a directory called `/workdir` and make that the working directory ENV APP_HOME /workdir RUN mkdir $ # Map port 8080 to the outside world (your local computer) EXPOSE 8080 ENTRYPOINT Įnter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |