![]() ![]() In the "CONNECTIONS AND AUTHENTICATION" section, I found a line with a commented-out port = 5432. Now let's cd into and list all the files: cd nf ! □ So, I attempted to locate it in the terminal: /opt/homebrew/var I stopped the installation process by using this command: brew services stop postgresqlĪfter some Googling, I narrowed the issue down to the nf file. Now, we can use homebrew to install Postgres: brew install installed but you can check the versions and notes for reference.Įverything was looking good-I saw logs about installing dependencies and info on and sqlite. But if it's taking suspiciously long, you can try brew update -debug -verbose to get more details. The next step is to update homebrew: brew -vīe patient if this step is taking a while. If you don't have Homebrew installed on your Mac, you can follow these instructions to install it. Installing PostgreSQL Updating Homebrewįirst, I used the command brew -v to check if homebrew was installed on my computer and, if so, which version. This step took me a while to complete, so I want to document it in this article, hoping it could help other people facing similar issues.įor this project, I'm using a MacBook Pro with an Apple M1 Pro chip, and I started with Homebrew. However, I realized there is a "Step 0," which is to install Postgres and set up a user, password, database, and configure a port for SQL. While I'm excited to brush up my Python skills, I feel slightly intimidated as I have limited experience with Postgres or any local databases (cloud databases were my first choice for my solo projects).Īfter setting up my local environment (forking, cloning the repo, and adding remote upstream for more information, check out my other blog article), the first step is to run Docker and take a look at the current state of the project. I hope that was useful for any of you guys.Recently, I was brought on board to contribute to an open-source project called CivicTechJobs that uses a technology stack consisting of Django, Django REST Framework, React, Webpack, PostgreSQL, and Docker. If you happen to use other docker image (besides NodeJS or Postgres), pre-built images are likely to be availbale as well on DockerHub, so do yourself a favor and go search for them. Navigating to the NodeJS arm64v8 image page will show you available docker image tags, that can be used inside your Dockerfiles or docker-compose.ymlĪs well as the "How to use this image" instructions:įrom the description text we see that the template is arm64v8/node:, so in my case that would be arm64v8/node:16.17.1 (the 16.17.1 tag was listed on supported tags) Visit the official Docker Hub NodeJS page, scroll to Supported Architectures section and pick arm64v8 (basically you search for arm64): Let's go though the discussed NodeJS image configuration (see above) for the sake of example. The logic question to have after reading all this - where to get these arm images? The answer is - official Docker Hub pages. If you have an old codebase which uses Dockerfile (or docker-compose) to kickoff, you are very likely to deal with default x86/amd64 images, because that's what is given to you by default from Docker hub, UNLESS you specify you have an arm CPU on board.įor example, if you happen to use NodeJS (like me), you would likely to have something similar in your Dockerfile:Įnter fullscreen mode Exit fullscreen mode If you compare Docker for Mac performance with its counterpart on a regular low specs Linux machine (or a WSL2 instance) you'd be surprised how slow Docker is even on latest M1/M2 Mac with high specs and how fast it is on Linux.Īlright, so the issue is clear - we need faster Docker on Macs, what about the solution? It's easy - use Arm Docker images instead of default x86/amd64 :) I happen to use Docker on daily basis since most of my commercial projects heavily depend on it.ĭocker engine on Macs had a long history of being a slow runner. Short preface - as a developer, I've been quite happy with performance of my M1 MBA for almost a year, but there always was one thing which bothered me - slow Docker performance. I'll try to be short on text, so bear with me. This topic is about my experience with slow Docker performance on an M1 Macbook Air and my way to deal with it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |