Skip to content

Commit

Permalink
fixed version env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lkurzyniec committed Jun 11, 2024
1 parent 2a111ee commit c0d2149
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ At the end, You are in charge, so it's your decision to which path you would lik
* [Standalone](#standalone)
* [In docker](#in-docker)
* [Download form registry](#download-form-registry)
* [Build your own image](build-your-own-image)
* [Build your own image](#build-your-own-image)
* [Docker compose](#docker-compose)
* [Migrations](#migrations)
* [How to adapt](#how-to-adapt)
Expand Down Expand Up @@ -130,21 +130,22 @@ Execute `dotnet run --project src/HappyCode.NetCoreBoilerplate.Api` in the root
#### Download form registry

> Image is published using [docker-push](.github/workflows/docker-push.yml) workflow.
* Docker Hub - <https://hub.docker.com/r/lkurzyniec/netcore-boilerplate>
* GitHub Container Registry - <https://github.com/lkurzyniec/netcore-boilerplate/pkgs/container/netcore-boilerplate>

Simply execute `docker run --rm -p 5000:8080 --name netcore-boilerplate lkurzyniec/netcore-boilerplate` to download and spin up a container.

#### Build your own image

To run in docker with your own image, execute `docker build . -t netcore-boilerplate:local` in the root directory to build an image, and then `docker run --rm -p 5000:8080 --name netcore-boilerplate netcore-boilerplate:local` to spin up a container with it.
To run in docker with your own image, execute `docker build . -t netcore-boilerplate:local` in the root directory to build an image,
and then `docker run --rm -p 5000:8080 --name netcore-boilerplate netcore-boilerplate:local` to spin up a container with it.

### Docker compose

> When running on `Linux` (i.e. [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)), make sure that all docker files
([dockerfile](dockerfile), [docker-compose](docker-compose.yml) and all [mssql files](db/mssql)) have line endings `LF`.

Just run `docker-compose up` command in the root directory.
Just execute `docker-compose up` command in the root directory.

#### Migrations

Expand Down
6 changes: 3 additions & 3 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ARG VERSION=2.0.0
ARG SHA=none

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER $APP_UID
WORKDIR /app
Expand Down Expand Up @@ -48,6 +45,9 @@ COPY --from=publish /app .
ENV DOTNET_NOLOGO=true
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true

ARG VERSION=2.0.0
ARG SHA=none

ENV HC_SHA=${SHA}
ENV HC_VERSION=${VERSION}

Expand Down

0 comments on commit c0d2149

Please sign in to comment.