Update readme with docker image build guide
This commit is contained in:
parent
6bb44bef20
commit
01a7331354
2 changed files with 30 additions and 1 deletions
7
Dockerfile.single-platform
Normal file
7
Dockerfile.single-platform
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY build/glance /app/glance
|
||||||
|
|
||||||
|
EXPOSE 8080/tcp
|
||||||
|
ENTRYPOINT ["/app/glance"]
|
||||||
24
README.md
24
README.md
|
|
@ -80,7 +80,7 @@ Requirements: [Go](https://go.dev/dl/) >= v1.22
|
||||||
To build:
|
To build:
|
||||||
|
|
||||||
```
|
```
|
||||||
go build .
|
go build -o build/glance .
|
||||||
```
|
```
|
||||||
|
|
||||||
To run:
|
To run:
|
||||||
|
|
@ -88,3 +88,25 @@ To run:
|
||||||
```
|
```
|
||||||
go run .
|
go run .
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Building Docker image
|
||||||
|
|
||||||
|
Build Glance with CGO disabled:
|
||||||
|
|
||||||
|
```
|
||||||
|
CGO_ENABLED=0 go build -o build/glance .
|
||||||
|
```
|
||||||
|
|
||||||
|
Build the image:
|
||||||
|
|
||||||
|
**Make sure to replace "owner" with your name or organization.**
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t owner/glance:latest -f Dockerfile.single-platform .
|
||||||
|
```
|
||||||
|
|
||||||
|
Push the image to your registry:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker push owner/glance:latest
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue