Skip to content

Commit

Permalink
modify the user group on loadtester server/client (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanposhiho authored May 1, 2023
1 parent dbe1b39 commit b13f2a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 5 additions & 6 deletions loadtester/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ WORKDIR /go/src/github.com/mercari/tortoise/loadtester/client
COPY . .
RUN go build -o ./loadtester-client .

FROM alpine:3.11.6
FROM alpine:latest

COPY --from=build-env /go/src/github.com/mercari/tortoise/loadtester/client /bin/loadtester-client

RUN chmod a+x /bin/loadtester-client \
&& addgroup -S app \
&& adduser -S -G app app \
&& chown app:app /bin/loadtester-client
RUN apk --no-cache add ca-certificates

USER app
RUN addgroup -g 1001 app && adduser -D -G app -u 1001 app

USER 1001

CMD ["/bin/loadtester-client"]
11 changes: 6 additions & 5 deletions loadtester/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ WORKDIR /go/src/github.com/mercari/tortoise/loadtester/server
COPY . .
RUN go build -o ./loadtester-server .

FROM alpine:3.11.6
FROM alpine:latest

COPY --from=build-env /go/src/github.com/mercari/tortoise/loadtester/server /bin/loadtester-server

RUN chmod a+x /bin/loadtester-server \
&& addgroup -S app \
&& adduser -S -G app app \
&& chown app:app /bin/loadtester-server
RUN apk --no-cache add ca-certificates

RUN addgroup -g 1001 app && adduser -D -G app -u 1001 app

USER 1001

CMD ["/bin/loadtester-server"]

0 comments on commit b13f2a1

Please sign in to comment.