feat: added http srever to dockerfile

This commit is contained in:
Krzysztof R. 2024-05-12 12:46:37 +02:00
parent dff7cc6474
commit 4abfd73e9d

View File

@ -1,10 +1,15 @@
FROM alpine:latest FROM node:latest
# Install dependencies # Create app directory
RUN apk add --no-cache httpie WORKDIR /usr/src/app
# Set the default listening port # Install app dependencies
ENV PORT 8080
# Command to start the server # If you also need http-server globally
CMD http-server -p $PORT RUN npm install -g http-server
# Bundle app source
COPY . .
EXPOSE 8080
CMD ["http-server", "-p 8080"]