From 884c787707bae1ad37878b71afa33359542be54c Mon Sep 17 00:00:00 2001 From: Brooks Townsend Date: Mon, 1 May 2023 10:28:33 -0400 Subject: [PATCH 1/2] bumped to elixir 1.14.4 Signed-off-by: Brooks Townsend --- .github/workflows/test.yml | 2 +- mix.exs | 2 +- mix.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78b628f..68e7bfc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, windows-2022, macos-11] - elixir: [1.13.4] + elixir: [1.14.4] otp: [25] name: Build and test diff --git a/mix.exs b/mix.exs index 0e6fab0..e4b28a0 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ defmodule LatticeObserver.MixProject do [ app: :lattice_observer, version: "0.4.0", - elixir: "~> 1.12", + elixir: "~> 1.14", elixirc_paths: compiler_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), diff --git a/mix.lock b/mix.lock index f8f8a56..c656d2d 100644 --- a/mix.lock +++ b/mix.lock @@ -1,8 +1,8 @@ %{ "cloudevents": {:hex, :cloudevents, "0.6.1", "d3f467a615c00712cf3c9632f6d131695fd3e1d29c10477d2d2fbbec06350522", [:mix], [{:avrora, "~> 0.21", [hex: :avrora, repo: "hexpm", optional: true]}, {:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: false]}, {:typed_struct, "~> 0.3.0", [hex: :typed_struct, repo: "hexpm", optional: false]}], "hexpm", "f0055549bc651bd6702347328dd5824d3f08fbf308d2c7212252e34e345bcb9c"}, - "dialyxir": {:hex, :dialyxir, "1.2.0", "58344b3e87c2e7095304c81a9ae65cb68b613e28340690dfe1a5597fd08dec37", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "61072136427a851674cab81762be4dbeae7679f85b1272b6d25c3a839aff8463"}, + "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "jason": {:hex, :jason, "1.3.0", "fa6b82a934feb176263ad2df0dbd91bf633d4a46ebfdffea0c8ae82953714946", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "53fc1f51255390e0ec7e50f9cb41e751c260d065dcba2bf0d08dc51a4002c2ac"}, + "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, "typed_struct": {:hex, :typed_struct, "0.3.0", "939789e3c1dca39d7170c87f729127469d1315dcf99fee8e152bb774b17e7ff7", [:mix], [], "hexpm", "c50bd5c3a61fe4e198a8504f939be3d3c85903b382bde4865579bc23111d1b6d"}, "uuid": {:hex, :uuid, "1.1.8", "e22fc04499de0de3ed1116b770c7737779f226ceefa0badb3592e64d5cfb4eb9", [:mix], [], "hexpm", "c790593b4c3b601f5dc2378baae7efaf5b3d73c4c6456ba85759905be792f2ac"}, } From 6952a96ce43b3fb59534af517861e98e668a7ad1 Mon Sep 17 00:00:00 2001 From: Brooks Townsend Date: Mon, 1 May 2023 16:53:11 -0400 Subject: [PATCH 2/2] added dockerfile and makefile for testing Signed-off-by: Brooks Townsend --- Dockerfile | 29 +++++++++++++++++++++++++++++ Makefile | 14 ++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6f1e01 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +ARG BUILDER_IMAGE + +## +# STEP 1: Retrieve dependencies +## +FROM ${BUILDER_IMAGE} AS builder + +ARG MIX_ENV=prod +ENV MIX_ENV=${MIX_ENV} + +WORKDIR /opt/app +# This copies our app source code into the build container +COPY ./ ./lattice_observer + +# Install necessary system dependencies +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ + git \ + ca-certificates && \ + update-ca-certificates + +# This step installs all the build tools we'll need +RUN mix local.rebar --force && \ + mix local.hex --force + +WORKDIR /opt/app/lattice_observer +# FAILS HERE +RUN mix deps.get +RUN mix compile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..31148ea --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.PHONY: setup-buildx buildx-image + +PLATFORM ?= linux/amd64 # Should be linux/amd64,linux/arm64/v8 + +setup-buildx: + docker buildx create --name multiarch --driver docker-container --use + docker buildx inspect --bootstrap + +buildx-image: ## Example showing segfault + docker buildx build $(BASE_ARGS) \ + --platform $(PLATFORM) \ + --build-arg BUILDER_IMAGE=elixir:1.14.4-slim \ + -t lattice_observer:latest \ + . \ No newline at end of file