You can read Dockerfile reference here to better understand what we are doing.Ī good start - is a way to success! One can use official Elixir’s image as a good start. Yarn (this step is optionally, but I suggest to use Yarn for development purposes).NodeJS (to use webpack, as Phoenix uses it by default).Now, let’s move on and create Dockerfile for the image! Dockerfile entrailsįirst, we need to understand, what do we basically need from the environment: :/workspace - ~/.gitconfig:/root/.gitconfig - ~/.ssh:/root/.ssh command : sleep infinity depends_on : - postgres docker/dev dockerfile : Dockerfile container_name : vscode_remote_app ports : - 4000:4000 volumes :. docker/data/postgres:/var/lib/postgres/data app : build : context. Version : ' 3.7' services : postgres : image : postgres:11.3-alpine container_name : vscode_remote_postgres restart : always ports : - 15432:5432 volumes :. We’ll call it from the command line like this: You can have both VSCode and VSCode Insider on the same machine. While VSCode Remote is in early-access now, this extension requires VSCode Insiders installation. Which will contain everything that we need. You can follow official instructions in order to install docker-ce, Docker-composeĭocker-compose ships with docker package. You can skip the section if you already have docker-compose and code-insiders installed, and you are sure with your Elixir skills. NOTE: VSCode Remote requires VSCode Insiders installation. We’ll scaffold the project with easy next in the article Prerequisites use VSCode and Docker-Compose in order to orchestrate and easy-access containerized development environment.we’ll make a separate container for our database, and configure the connection between containers.we’ll make a special container to development purposes, which will hold Elixir runtime.This article will dive into creating simple development environment using Docker Compose (and optional - VSCode Remote Tools)Īs a simple showcase, we’ll try to containerize the environment for scaffolded Phoenix application.
0 Comments
Leave a Reply. |