Skip to content

Commit

Permalink
Merge pull request #399 from hwong0305/git
Browse files Browse the repository at this point in the history
feature: resolve #396 add git to containers running apps
  • Loading branch information
hwong0305 authored Nov 6, 2021
2 parents 74c5a6c + 560a811 commit ce94f99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:alpine

RUN apk add git --no-cache
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "myproxy"

ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["node"]
3 changes: 2 additions & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ if [ ! -f "./data.db" ] ; then
touch data.db
fi

# pull node docker image
# build docker iamge
if docker ps > /dev/null 2>&1; then
docker pull node:alpine
docker build -t myproxy-node ./scripts
else
echo "WARNING: Couldn't run docker commands"
echo "WARNING: Make sure your user has the right permissions"
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const createContainer = async (
const workPath = path.resolve(environment.WORKPATH, fullDomain)
return docker
.createContainer({
Image: 'node:alpine',
Image: 'myproxy-node:latest',
name: fullDomain,
User: 'node',
ExposedPorts: {
Expand Down

0 comments on commit ce94f99

Please sign in to comment.