Skip to content

Commit

Permalink
add Dockerfile for benchmarker
Browse files Browse the repository at this point in the history
  • Loading branch information
catatsuy committed Jan 13, 2024
1 parent 52a3c47 commit b42d4f2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
18 changes: 18 additions & 0 deletions bench/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM golang:1.21

RUN mkdir -p /opt/go
WORKDIR /opt/go

COPY initial-data /initial-data
COPY webapp/public/static /static

COPY go.mod /opt/go/go.mod
COPY go.sum /opt/go/go.sum
RUN go mod download

COPY cmd/ /opt/go/cmd
COPY bench/ /opt/go/bench

RUN go build -o benchmarker cmd/bench/main.go

ENTRYPOINT ["/opt/go/bench/run.sh"]
3 changes: 3 additions & 0 deletions bench/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec "$@"
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/isucon/isucon9-qualify

go 1.12
go 1.21.6

require (
github.com/morikuni/failure v0.11.0
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9
github.com/morikuni/failure v1.1.2
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/morikuni/failure v0.11.0 h1:fLQwvKbFhGYmHankExnKlsKGYbath50lBAujCd4lE7A=
github.com/morikuni/failure v0.11.0/go.mod h1:+IjvKCz9B/D4BQrTzYLwERdWyMkGJdu+q5gri9dWecg=
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE=
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
github.com/morikuni/failure v1.1.2 h1:sD7RTQglZDw0r/z4Vl/bqEMQsq/lFCjD6siaeQCtxM8=
github.com/morikuni/failure v1.1.2/go.mod h1:L0J9wqj1oMinkEy0raB974kGFVDH2sEKZFafjB10O+8=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
1 change: 0 additions & 1 deletion initial-data/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bench1.zip
images

0 comments on commit b42d4f2

Please sign in to comment.