Skip to content

Commit

Permalink
Add Docker container for easier usage
Browse files Browse the repository at this point in the history
  • Loading branch information
devnoname120 committed Aug 10, 2024
1 parent 9f7a877 commit b4a3ea4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
17 changes: 17 additions & 0 deletions hasmer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /source

COPY hasmer.sln hasmer.sln
COPY hasmer-lsp/hasmer-lsp.csproj hasmer-lsp/hasmer-lsp.csproj
COPY hasmer-cli/hasmer-cli.csproj hasmer-cli/hasmer-cli.csproj
COPY libhasmer/libhasmer.csproj libhasmer/libhasmer.csproj
RUN dotnet restore "hasmer.sln"

COPY . .
RUN dotnet publish -o /app


FROM mcr.microsoft.com/dotnet/runtime:5.0
WORKDIR /assets
COPY --from=build /app /app
ENTRYPOINT ["/app/hasmer"]
16 changes: 15 additions & 1 deletion hasmer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,24 @@ This directory contains the C# source code for `hasmer`, using the .NET 5.0 plat

# Setup

You will need the .NET 5 SDK to compile this project. See the [.NET SDK download page](https://dotnet.microsoft.com/en-us/download) for information on how to download the .NET SDK for your operating system.
If you don't use the Docker image then you will need the .NET 5 SDK to compile this project. See the [.NET SDK download page](https://dotnet.microsoft.com/en-us/download) for information on how to download the .NET SDK for your operating system.

# Building

## Using Docker

```
docker build -t hasmer .
```

From the directory where your bundle is you can then run commands, for example:

```
docker run --volume $(pwd):/assets hasmer disassemble -i index.android.bundle
```

## Manually

You can open the solution file (see `hasmer.sln`) in Visual Studio and build and run from Visual Studio.

You can also build from the command line using the .NET SDK CLI:
Expand Down

0 comments on commit b4a3ea4

Please sign in to comment.