miguelsrrobo

miguelsrrobo

I have doubts about creating a development environment with docker, I found this tutorial on medium , but I do not know if it is the most correct to follow, my doubt and how I create a development environment with elixir and phoenix using docker, and if the form shown in the medium tutorial is correct, if not indicated, someone could tell me how I create this environment.

Showing Posts 1 to 8

noelworden

noelworden

I spun up a side project with Docker last fall and wrote about it, this post might help.

miguelsrrobo

miguelsrrobo OP

I know it’s a silly question, but if I follow this post, it will work on Linux.

cenotaph

cenotaph

Personally if you are on Linux(Unix) and have the right permissions why bother with docker?

Installing whole setup would be 3 or so commands, and you can work on the fastest easiest environment to learn, debug

noelworden

noelworden

I can’t say with 100% certainty, but yes, I believe that what I wrote will work with Linux

miguelsrrobo

miguelsrrobo OP

yes, I understand that point of view, but I see that using docker would increase the versatility in the installation in other operating systems, besides I don’t worry if I have to format my computer.

miguelsrrobo

miguelsrrobo OP

I gave the docker build but this error came on the screen:
db uses an image, skipping
Building web
Step 1/9 : FROM bitwalker/alpine-elixir-phoenix:1.10.3
"# Executing 1 build trigger
—> Using cache
—> cc1de04a9ee9
Step 2/9 : RUN mkdir /app
—> Using cache
—> 70f87955bcb2
Step 3/9 : WORKDIR /app
—> Using cache
—> f721dd85a6ef
Step 4/9 : COPY mix.exs mix.lock ./
ERROR: Service ‘web’ failed to build: COPY failed: file not found in build context or excluded by .dockerignore: stat mix.exs: file does not exist

cenotaph

cenotaph

You can develop locally and use docker just to publish. I don’t get the craze personally.

from my point of view the less time I spend on the environment the more time I can spend on the code, learning, feature sets. Personal preferences.

jakemorrison

jakemorrison

I have been working on a full featured example container build for Elixir/Phoenix:

It includes support for Visual Studio Code building in a container, as well as:

  • Uses Docker BuildKit for parallel multistage builds and caching of OS files and language packages. Multistage builds compile dependencies separately from app code, speeding rebuilds and reducing final image size. Caching of packages reduces size of container layers and allows sharing of data betwen container targets.
  • Supports Alpine and Debian, using hexpm/elixir base images.
  • Uses Erlang releases for the final image, resulting in an image size of less than 20MB (5.6 MB Alpine OS files, 1.3 MB TLS libraries, 12 MB Erlang VM + app).
  • Supports mirroring base images from Docker Hub to AWS ECR to avoid rate limits and ensure consistent builds.
  • Supports building for multiple architectures, e.g. AWS Gravaton ARM processor. Arm builds work on Intel with both Mac hardware and Linux (CodeBuild), and should work the other direction on Apple Silicon.
  • Supports deploying to AWS ECS using CodeBuild, CodeDeploy Blue/Green deployment, and AWS Parameter Store for configuration. See ecs/buildspec.yml. Terraform is used to set up the environment, see GitHub - cogini/multi-env-deploy: Complete example of deploying complex web apps to AWS using Terraform, Ansible, and Packer · GitHub
  • Supports compiling assets such as JS/CSS within the container, then exporting them to the Docker host so that they can be uploaded to a CDN.
  • Supports building with docker buildx bake, a docker-native build tool similar to docker-compose which uses the more powerful HCL syntax and supports native caching functionality.
  • Supports building with Earthly, an improved Dockerfile with better syntax, caching, and testing workflows.
— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews