mirror of
https://github.com/rjNemo/docker_examples
synced 2026-06-06 02:26:45 +00:00
fix CVE in react
This commit is contained in:
parent
c7e0784905
commit
d72f85f9e9
12 changed files with 3584 additions and 3263 deletions
12
README.md
12
README.md
|
|
@ -5,3 +5,15 @@ Dockerfile examples for:
|
|||
- Node.js,
|
||||
- Python,
|
||||
- React
|
||||
|
||||
## Build a container
|
||||
|
||||
```shell
|
||||
docker build -t $APPNAME:$VERSION .
|
||||
```
|
||||
|
||||
## Run a container
|
||||
|
||||
```shell
|
||||
docker run --rm $APPNAME:$VERSION
|
||||
```
|
||||
|
|
|
|||
4
elixir/.formatter.exs
Normal file
4
elixir/.formatter.exs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Used by "mix format"
|
||||
[
|
||||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
|
||||
]
|
||||
26
elixir/.gitignore
vendored
Normal file
26
elixir/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# The directory Mix will write compiled artifacts to.
|
||||
/_build/
|
||||
|
||||
# If you run "mix test --cover", coverage assets end up here.
|
||||
/cover/
|
||||
|
||||
# The directory Mix downloads your dependencies sources to.
|
||||
/deps/
|
||||
|
||||
# Where third-party dependencies like ExDoc output generated docs.
|
||||
/doc/
|
||||
|
||||
# Ignore .fetch files in case you like to edit your project deps locally.
|
||||
/.fetch
|
||||
|
||||
# If the VM crashes, it generates a dump, let's ignore it too.
|
||||
erl_crash.dump
|
||||
|
||||
# Also ignore archive artifacts (built via "mix archive.build").
|
||||
*.ez
|
||||
|
||||
# Ignore package tarball (built via "mix hex.build").
|
||||
example-*.tar
|
||||
|
||||
# Temporary files, for example, from tests.
|
||||
/tmp/
|
||||
|
|
@ -0,0 +1 @@
|
|||
IEx.after_spawn(fn -> Example.hello() |> IO.puts() end)
|
||||
7
elixir/Dockerfile
Normal file
7
elixir/Dockerfile
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
FROM elixir:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN iex -s mix
|
||||
21
elixir/README.md
Normal file
21
elixir/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Example
|
||||
|
||||
**TODO: Add description**
|
||||
|
||||
## Installation
|
||||
|
||||
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
|
||||
by adding `example` to your list of dependencies in `mix.exs`:
|
||||
|
||||
```elixir
|
||||
def deps do
|
||||
[
|
||||
{:example, "~> 0.1.0"}
|
||||
]
|
||||
end
|
||||
```
|
||||
|
||||
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
|
||||
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
|
||||
be found at <https://hexdocs.pm/example>.
|
||||
|
||||
18
elixir/lib/example.ex
Normal file
18
elixir/lib/example.ex
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
defmodule Example do
|
||||
@moduledoc """
|
||||
Documentation for `Example`.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
Hello world.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> Example.hello()
|
||||
:world
|
||||
|
||||
"""
|
||||
def hello do
|
||||
:world
|
||||
end
|
||||
end
|
||||
28
elixir/mix.exs
Normal file
28
elixir/mix.exs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
defmodule Example.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
def project do
|
||||
[
|
||||
app: :example,
|
||||
version: "0.1.0",
|
||||
elixir: "~> 1.13",
|
||||
start_permanent: Mix.env() == :prod,
|
||||
deps: deps()
|
||||
]
|
||||
end
|
||||
|
||||
# Run "mix help compile.app" to learn about applications.
|
||||
def application do
|
||||
[
|
||||
extra_applications: [:logger]
|
||||
]
|
||||
end
|
||||
|
||||
# Run "mix help deps" to learn about dependencies.
|
||||
defp deps do
|
||||
[
|
||||
# {:dep_from_hexpm, "~> 0.3.0"},
|
||||
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
|
||||
]
|
||||
end
|
||||
end
|
||||
8
elixir/test/example_test.exs
Normal file
8
elixir/test/example_test.exs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
defmodule ExampleTest do
|
||||
use ExUnit.Case
|
||||
doctest Example
|
||||
|
||||
test "greets the world" do
|
||||
assert Example.hello() == :world
|
||||
end
|
||||
end
|
||||
1
elixir/test/test_helper.exs
Normal file
1
elixir/test/test_helper.exs
Normal file
|
|
@ -0,0 +1 @@
|
|||
ExUnit.start()
|
||||
|
|
@ -12,7 +12,7 @@ RUN go mod download
|
|||
COPY . .
|
||||
RUN go build -o ./out/dist .
|
||||
|
||||
FROM alpine
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk upgrade --no-cache
|
||||
|
||||
|
|
|
|||
6719
react/yarn.lock
6719
react/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue