Add and use golang user

This commit is contained in:
Oliver Davies 2022-01-26 12:51:20 +00:00
parent 5079cdc5f0
commit 8732a54c20
2 changed files with 9 additions and 1 deletions

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM golang:alpine
WORKDIR /app
RUN adduser --disabled-password golang \
&& chown golang:golang -R /app
USER golang

View file

@ -1,6 +1,6 @@
services:
app:
image: "golang:alpine"
build: "."
volumes:
- "./:/app"
working_dir: /app