mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 00:45:19 +00:00
Updated .dockerignore and added non-root user to Dockerfile (#143)
Running applications as root (default Docker user) is not a good security practice. The goal of this PR is to run the Fleet application as a non-root user. For development you can still access the container as root with the following command: `docker run -it --user=0 <fleetdm container ID> bash`
This commit is contained in:
parent
19816cee1a
commit
f735317f07
@ -1,2 +1,3 @@
|
||||
*
|
||||
!build/
|
||||
!build/binary-bundle/linux/fleet
|
||||
!build/binary-bundle/linux/fleetctl
|
||||
|
@ -3,6 +3,10 @@ MAINTAINER Fleet Developers <engineering@fleetdm.com>
|
||||
|
||||
RUN apk --update add ca-certificates
|
||||
|
||||
# Create FleetDM group and user
|
||||
RUN addgroup -S fleet && adduser -S fleet -G fleet
|
||||
|
||||
COPY ./build/binary-bundle/linux/fleet ./build/binary-bundle/linux/fleetctl /usr/bin/
|
||||
|
||||
USER fleet
|
||||
CMD ["fleet", "serve"]
|
||||
|
Loading…
Reference in New Issue
Block a user