Skip to content

Commit 06a0683

Browse files
committed
Add mix tasks
1 parent 9b06c5c commit 06a0683

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**
22
!.pkgx.yaml
33
!lib/**/*
4+
lib/mix/**/*
45
!mix.exs

lib/mix/tasks/docker.ex

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
defmodule Mix.Tasks.Docker do
2+
use Mix.Task
3+
4+
@shortdoc "Manages Docker operations for the project."
5+
6+
def run(args) do
7+
case args do
8+
["build"] -> build()
9+
_ -> Mix.raise("Usage: mix docker build")
10+
end
11+
end
12+
13+
defp build do
14+
System.cmd("docker", ["build", "--progress", "plain", "--tag", "elixir_script:latest", "-f", ".github/Dockerfile", "."])
15+
end
16+
end

0 commit comments

Comments
 (0)