Skip to content

Commit 560a811

Browse files
committed
Update scriipts to use local build dockerfile.
For better documentation. #399 (comment)
1 parent 3582ce9 commit 560a811

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
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: 3 additions & 2 deletions
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
94-
docker pull devwong0305/myproxy-node:latest
94+
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: 'devwong0305/myproxy-node:latest', // Image should be copied to GarageScript account later so its more official. This is a node:alpine image with git installed.
38+
Image: 'myproxy-node:latest',
3939
name: fullDomain,
4040
User: 'node',
4141
ExposedPorts: {

0 commit comments

Comments
 (0)