Skip to content

Commit

Permalink
base: introduce entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantony committed Dec 4, 2024
1 parent a5e0f5b commit a5be42a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,7 @@ ENV GOROOT="/usr/local/go" \
GOPATH="/root/go" \
PATH="/usr/local/go/bin:/root/go/bin:/root/.nvm/versions/node/v${NODE_VERSION}/bin:${PATH}"

# Set a custom entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
11 changes: 11 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# This is an entrypoint script that is used execute some actions
# when the container is started.

# We clean-up the tmp folder as part of the startup because it can
# be flooded very fast with files and folders related to vscode, devextension, yarn, gobuilds etc...
rm -rf /tmp/*

# Execute the default command from the base image
exec "$@"

0 comments on commit a5be42a

Please sign in to comment.