jh revised this gist . Go to revision
1 file changed, 1 insertion, 1 deletion
docker-compose.yml
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | services: | |
| 2 | 2 | edubadges-ui: | |
| 3 | - | # build Dockerfile directly. Can also be a relative directory. | |
| 3 | + | # build Dockerfile directly. Can also be a relative directory (wherever you put the Dockerfile) | |
| 4 | 4 | build: . | |
| 5 | 5 | # alternatively build first: docker build -t edubadges-ui . | |
| 6 | 6 | # and then reference the build image: | |
jh revised this gist . Go to revision
1 file changed, 1 insertion
Dockerfile
| @@ -1,3 +1,4 @@ | |||
| 1 | + | # Add Caddy (a web server similar to nginx) | |
| 1 | 2 | FROM caddy:2-builder as builder | |
| 2 | 3 | RUN xcaddy build | |
| 3 | 4 | ||
jh revised this gist . Go to revision
1 file changed, 5 insertions, 3 deletions
docker-compose.yml
| @@ -1,7 +1,9 @@ | |||
| 1 | 1 | services: | |
| 2 | 2 | edubadges-ui: | |
| 3 | - | image: edubadges-ui | |
| 3 | + | # build Dockerfile directly. Can also be a relative directory. | |
| 4 | + | build: . | |
| 5 | + | # alternatively build first: docker build -t edubadges-ui . | |
| 6 | + | # and then reference the build image: | |
| 7 | + | # image: edubadges-ui | |
| 4 | 8 | ports: | |
| 5 | 9 | - "2015:2015" | |
| 6 | - | ||
| 7 | - | # visit http://localhost:2015 | |
jh revised this gist . Go to revision
2 files changed, 25 insertions
Dockerfile(file created)
| @@ -0,0 +1,18 @@ | |||
| 1 | + | FROM caddy:2-builder as builder | |
| 2 | + | RUN xcaddy build | |
| 3 | + | ||
| 4 | + | FROM node:16.13.2 | |
| 5 | + | COPY --from=builder /usr/bin/caddy /usr/bin/caddy | |
| 6 | + | WORKDIR /app | |
| 7 | + | RUN apt-get update && apt-get install -y curl git \ | |
| 8 | + | && rm -rf /var/lib/apt/lists/* | |
| 9 | + | RUN curl -fsSL https://bun.sh/install | bash | |
| 10 | + | RUN git clone https://github.com/edubadges/edubadges-ui.git | |
| 11 | + | WORKDIR /app/edubadges-ui | |
| 12 | + | RUN git checkout v6.10.0 | |
| 13 | + | RUN yarn install | |
| 14 | + | RUN yarn build | |
| 15 | + | ||
| 16 | + | EXPOSE 2015 | |
| 17 | + | ||
| 18 | + | CMD [ "caddy", "file-server", "--listen", ":2015", "--root", "./public" ] | |
docker-compose.yml(file created)
| @@ -0,0 +1,7 @@ | |||
| 1 | + | services: | |
| 2 | + | edubadges-ui: | |
| 3 | + | image: edubadges-ui | |
| 4 | + | ports: | |
| 5 | + | - "2015:2015" | |
| 6 | + | ||
| 7 | + | # visit http://localhost:2015 | |