Skip to content

Commit

Permalink
docker: added user
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Mar 11, 2024
1 parent b29b47f commit 19aaae5
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,14 @@ COPY --from=oil /usr/local/bin/* /usr/local/bin/
COPY --from=starship /usr/local/bin/* /usr/local/bin/
COPY --from=vivid /usr/local/bin/* /usr/local/bin/

ADD .dockerfile/root /root
ADD .dockerfile/usr/local/bin/* /usr/local/bin/
RUN groupadd --gid 1000 carapace \
&& useradd --uid 1000 --gid 1000 --create-home carapace \
&& mkdir /.cache \
&& chmod -R a+rwx /.cache /go

COPY .dockerfile/home /root/
COPY --chown=1000:1000 .dockerfile/home /home/carapace/
COPY .dockerfile/usr/local/bin/* /usr/local/bin/

ENV TERM xterm
ENTRYPOINT [ "entrypoint.sh" ]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build: .
image: ghcr.io/rsteube/carapace
command: sh -c 'cd /carapace/example && go build -buildvcs=false .'
user: 1000:1000
environment:
TARGET: /carapace/example/example
volumes:
Expand Down

0 comments on commit 19aaae5

Please sign in to comment.