Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tukeJonny committed Nov 24, 2023
1 parent edd13ba commit c945926
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
26 changes: 26 additions & 0 deletions bench/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM golang:1.21.0-bookworm

WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y gcc g++ make locales locales-all

RUN locale-gen en_US.UTF-8
RUN useradd --uid=1001 --create-home benchuser
USER benchuser

RUN mkdir -p /home/benchuser
WORKDIR /home/benchuser
COPY --chown=benchuser:benchuser ./ /home/benchuser/
RUN go build -o bench ./cmd/bench

ENV GOPATH=/home/benchuser/tmp/go
ENV GOCACHE=/home/benchuser/tmp/go/.cache

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

ENTRYPOINT ["/home/benchuser/bench"]
CMD ["supervise"]
File renamed without changes.
4 changes: 2 additions & 2 deletions bench/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ pretest: build

docker_image:
sudo aws ecr get-login-password --region ap-northeast-1 | sudo docker login --username AWS --password-stdin 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com
sudo docker build -t isucon13-benchmarker . --no-cache
sudo docker build -f Dockerfile.dev -t isucon13-benchmarker . --no-cache
sudo docker tag isucon13-benchmarker:latest 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com/isucon13-benchmarker:latest
sudo docker push 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com/isucon13-benchmarker:latest

docker_image_prod:
sudo aws ecr get-login-password --region ap-northeast-1 | sudo docker login --username AWS --password-stdin 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com
sudo docker build -t isucon13-benchmarker-prod . --no-cache
sudo docker build -f Dockerfile.prod -t isucon13-benchmarker-prod . --no-cache
sudo docker tag isucon13-benchmarker-prod:latest 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com/isucon13-benchmarker-prod:latest
sudo docker push 424484851194.dkr.ecr.ap-northeast-1.amazonaws.com/isucon13-benchmarker-prod:latest

Expand Down

0 comments on commit c945926

Please sign in to comment.