Skip to content

Commit

Permalink
fix: build the Docker image and update the doc
Browse files Browse the repository at this point in the history
Also, copy patches/ into the build stage image, so patch-package
can apply the patch properly.

Fix italia#311.
  • Loading branch information
bfabio committed Feb 8, 2024
1 parent cde2535 commit 32355c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.git
node_modules
build
dist
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Stage 0, "build-stage".
FROM node:lts as build-stage
FROM docker.io/node:18 as build-stage

WORKDIR /app
COPY package*.json /app/

# First install deps, then copy app and build.
RUN apt-get update \
&& apt-get -y --no-install-recommends install golang-go=2:1.19~1 golang-src=2:1.19~1

COPY . /app

RUN npm ci
COPY ./ /app/
RUN npm run build

# Stage 1, "prod-stage".
FROM nginx:1
FROM docker.io/nginx:1
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ docker build -t publiccode-editor .
you can build a Docker image. Subsequently, by running:

```console
docker run -p 8080:8080 publiccode-editor
docker run -p 8080:80 publiccode-editor
```

you can run the Docker container and see the results at [`http://localhost:8080`](http://localhost:8080).
Expand Down

0 comments on commit 32355c9

Please sign in to comment.