Skip to content

Commit ce94f99

Browse files
authored
Merge pull request #399 from hwong0305/git
feature: resolve #396 add git to containers running apps
2 parents 74c5a6c + 560a811 commit ce94f99

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

scripts/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM node:alpine
2+
3+
RUN apk add git --no-cache
4+
RUN git config --global user.email "[email protected]"
5+
RUN git config --global user.name "myproxy"
6+
7+
ENTRYPOINT ["docker-entrypoint.sh"]
8+
CMD ["node"]

scripts/setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ if [ ! -f "./data.db" ] ; then
8989
touch data.db
9090
fi
9191

92-
# pull node docker image
92+
# build docker iamge
9393
if docker ps > /dev/null 2>&1; then
9494
docker pull node:alpine
95+
docker build -t myproxy-node ./scripts
9596
else
9697
echo "WARNING: Couldn't run docker commands"
9798
echo "WARNING: Make sure your user has the right permissions"

src/helpers/docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const createContainer = async (
3535
const workPath = path.resolve(environment.WORKPATH, fullDomain)
3636
return docker
3737
.createContainer({
38-
Image: 'node:alpine',
38+
Image: 'myproxy-node:latest',
3939
name: fullDomain,
4040
User: 'node',
4141
ExposedPorts: {

0 commit comments

Comments
 (0)