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