Run container as user
This commit is contained in:
parent
86676c61e5
commit
1c55277edf
@ -9,7 +9,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: golang:latest
|
||||
image: golang:1
|
||||
commands:
|
||||
- apt-get update && apt-get install -y build-essential git go-bindata
|
||||
- go generate -v
|
||||
|
10
Dockerfile
10
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM golang:latest as gobuild
|
||||
FROM golang:1 as gobuild
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y build-essential git go-bindata
|
||||
@ -7,9 +7,9 @@ WORKDIR /go/src/git.nemunai.re/chldapasswd
|
||||
|
||||
ADD . .
|
||||
|
||||
RUN go generate -v
|
||||
RUN go get -d -v
|
||||
RUN go build -v
|
||||
RUN go generate -v && \
|
||||
go get -d -v && \
|
||||
go build -v
|
||||
|
||||
|
||||
FROM debian:stable-slim
|
||||
@ -20,6 +20,8 @@ RUN apt-get update && \
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
USER nobody
|
||||
|
||||
WORKDIR /srv
|
||||
|
||||
ENTRYPOINT ["/srv/chldapasswd", "-bind=:8080"]
|
||||
|
Loading…
Reference in New Issue
Block a user