Skip to content

Commit d1fe7a1

Browse files
committed
ports changed and non-root user specified
1 parent 5c77bf2 commit d1fe7a1

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ WORKDIR /app
44

55
COPY . .
66

7-
RUN rm -rf screenshots/
7+
RUN rm -rf screenshots/ runme.sh
88

99
RUN npm install --production
1010

1111
RUN apk --no-cache add openssl
1212

1313
RUN sh generate-cert.sh
1414

15-
EXPOSE 80 443
15+
EXPOSE 8080 8443
1616

17+
USER 10001
1718

1819
ENTRYPOINT ["node", "./index.js"]
1920
CMD []

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const sslOpts = {
5656
cert: require('fs').readFileSync('fullchain.pem'),
5757
};
5858

59-
http.createServer(app).listen(80);
60-
https.createServer(sslOpts,app).listen(443);
59+
http.createServer(app).listen(8080);
60+
https.createServer(sslOpts,app).listen(8443);
6161

6262
let calledClose = false;
6363

runme.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
docker build -t amolde/http-https-echo .
2+
docker login
3+
docker push amolde/http-https-echo

0 commit comments

Comments
 (0)