Skip to content

Commit

Permalink
Merge pull request #96 from isucon/debian
Browse files Browse the repository at this point in the history
コンテナイメージを言語公式に変更
  • Loading branch information
fujiwara authored Jun 24, 2022
2 parents 3ffd31d + 3e2947a commit d3a9332
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
webapp:
cpus: 1
mem_limit: 1g
build: ./webapp/
build: ./webapp/go
environment:
ISUCON_DB_HOST: mysql
ISUCON_DB_PORT: 3306
Expand Down Expand Up @@ -50,7 +50,7 @@ services:
restart: always

blackauth:
build: ./webapp
build: ./webapp/go
ports:
- "3001:3001"
init: true
Expand All @@ -64,7 +64,7 @@ services:
- main.go

bench:
build: ./webapp
build: ./webapp/go
stdin_open: true
tty: true
environment:
Expand Down
17 changes: 0 additions & 17 deletions webapp/Dockerfile

This file was deleted.

20 changes: 20 additions & 0 deletions webapp/go/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM golang:1.18.3-bullseye

WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y wget gcc g++ make sqlite3 && \
wget -q https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb && \
apt-get -y install ./mysql-apt-config_*_all.deb && \
apt-get -y update && \
apt-get -y install mysql-client

RUN mkdir -p /home/isucon/webapp/go
WORKDIR /home/isucon/webapp/go

ENV GOPATH /home/isucon/go
ENV PATH /home/isucon/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN go install github.com/cespare/reflex@latest

CMD [ "reflex", "-r", "(\\.go$|go\\.mod)", "-s", "go", "run", "cmd/isuports/main.go" ]

0 comments on commit d3a9332

Please sign in to comment.