~dricottone/container-images

ba597d5ab832f925cf67b786c438545a03264ff2 — Dominic Ricottone 11 months ago f4352c8
Added simple-chat
5 files changed, 63 insertions(+), 0 deletions(-)

M README.md
A simple-chat/.gitignore
A simple-chat/Dockerfile
A simple-chat/Makefile
A simple-chat/README.md
M README.md => README.md +1 -0
@@ 19,6 19,7 @@ It should be easy to get things working on another build system.
|[php](/~dricottone/container-images/tree/dev/item/php/README.md)|latest,readwrite,fpm,development,fpm-development|`registry.intra.dominic-ricottone.com/php:latest`|
|[postfix](/~dricottone/container-images/tree/dev/item/postfix/README.md)|latest,tls-in,tls-out|`registry.intra.dominic-ricottone.com/postfix:latest`|
|[promtail](/~dricottone/container-images/tree/dev/item/promtail/README.md)|latest|`registry.intra.dominic-ricottone.com/promtail:latest`|
|[simple-chat](/~dricottone/container-images/tree/dev/item/simple-chat/README.md)|latest|`registry.intra.dominic-ricottone.com/simple-chat:latest`|
|[srht-core](/~dricottone/container-images/tree/dev/item/srht-core/README.md)|latest|`registry.intra.dominic-ricottone.com/srht-core:latest`|
|[srht-git-api](/~dricottone/container-images/tree/dev/item/srht-git-api/README.md)|latest|`registry.intra.dominic-ricottone.com/srht-git-api:latest`|
|[srht-git-core](/~dricottone/container-images/tree/dev/item/srht-git-core/README.md)|latest|`registry.intra.dominic-ricottone.com/srht-git-core:latest`|

A simple-chat/.gitignore => simple-chat/.gitignore +3 -0
@@ 0,0 1,3 @@
simple-chat.tar.gz
simple-chat-v1.0.1


A simple-chat/Dockerfile => simple-chat/Dockerfile +17 -0
@@ 0,0 1,17 @@
FROM docker.io/library/golang:alpine as builder
WORKDIR /app
COPY simple-chat-v1.0.1/server/* ./

RUN apk add make
RUN make clean && make go.mod && make server

FROM docker.io/library/alpine:latest
WORKDIR /app
COPY --from=builder /app/server /app/server

RUN adduser -H -D -u 1001 me
USER me:me

EXPOSE 8080
CMD [ "/app/server-bin" ]


A simple-chat/Makefile => simple-chat/Makefile +15 -0
@@ 0,0 1,15 @@
CONMAN=sudo docker

REGISTRY=registry.intra.dominic-ricottone.com
IMAGE=simple-chat
TAG=latest

image:
	curl -o simple-chat.tar.gz https://git.dominic-ricottone.com/~dricottone/simple-chat/archive/v1.0.1.tar.gz
	untar simple-chat.tar.gz
	$(CONMAN) buildx build --push \
		--platform linux/arm64,linux/amd64 \
		--tag $(REGISTRY)/$(IMAGE):$(TAG) \
		.

.PHONY: image

A simple-chat/README.md => simple-chat/README.md +27 -0
@@ 0,0 1,27 @@
# simple-chat


## Build and Deploy

```
make image
```


### Tags

 + `latest`

----

## Use

Can be used with any container manager toolchain.

Try:

```
$conman run --detach --name nginx --restart always \
    registry.intra.dominic-ricottone.com/simple-chat:latest
```