Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerize the application by creating a Dockerfile #26

Open
jhademcconnell opened this issue Jan 25, 2024 · 0 comments
Open

Containerize the application by creating a Dockerfile #26

jhademcconnell opened this issue Jan 25, 2024 · 0 comments

Comments

@jhademcconnell
Copy link

jhademcconnell commented Jan 25, 2024

To make this app simpler to run in a cloud environment, we can containerize the app by using Docker and creating a simple Dockerfile that looks like:

FROM node:lts-alpine

# install simple http server for serving static content
RUN npm install -g http-server

# make the 'app' folder the current working directory
WORKDIR /app

# copy both 'package.json' and 'package-lock.json' (if available)
COPY package*.json ./

# install project dependencies
RUN npm install

# copy project files and folders to the current working directory (i.e. 'app' folder)
COPY . .

# build app for production with minification
RUN npm run build

EXPOSE 8080
CMD [ "http-server", "dist" ]

Source: https://v2.vuejs.org/v2/cookbook/dockerize-vuejs-app

I’ve tried this setup and this Dockerfile works, but an application error is thrown that’s not thrown on the demo website:

ReferenceError: SharedArrayBuffer is not defined
    at 17b35eff-b80d-4c99-8195-9e4c9e9d7242:22:175
    at Object.be [as load] (index.396c12aa.js:42:4082)
    at async wp.transcode (index.396c12aa.js:42:6842)
    at async l (index.396c12aa.js:42:10753)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant